Breaking Changes
This guide gives hints and guidance in the case that you need to make a change to your app that might break functionality for current users.
Adding capabilities
const Homey = require('homey');
class Device extends Homey.Device {
async onInit() {
if (this.hasCapability('windowcoverings_set') === false) {
// You need to check if migration is needed
// do not call addCapability on every init!
await this.addCapability('windowcoverings_set');
}
}
}
module.exports = Device;import Homey from "homey";
export default class Device extends Homey.Device {
async onInit(): Promise<void> {
if (!this.hasCapability("windowcoverings_set")) {
// You need to check if migration is needed
// Do not call addCapability on every init!
await this.addCapability("windowcoverings_set");
}
}
}
Removing capabilities
Deprecating Flow cards
Changing the device class
Deprecating drivers
Last updated
Was this helpful?