diff --git a/APPSTORE.md b/APPSTORE.md index be5d8f9..7ae98e9 100644 --- a/APPSTORE.md +++ b/APPSTORE.md @@ -30,4 +30,5 @@ Xiaomi has released an update for the vacuum cleaners that enables zone cleaning ## Changelog ### v2.13.2 - 2019-11-10 -* Small fix for Yeelight not updating dim capability when in night mode +* Small fix for Yeelights not updating dim capability when in night mode +* Small fix for Yeelights not updating onoff capability when turning them on by only changing the color diff --git a/drivers/yeelights/device.js b/drivers/yeelights/device.js index 809b2b5..6b18e93 100644 --- a/drivers/yeelights/device.js +++ b/drivers/yeelights/device.js @@ -89,6 +89,10 @@ class YeelightDevice extends Homey.Device { }); this.registerMultipleCapabilityListener(['light_hue', 'light_saturation' ], ( valueObj, optsObj ) => { + if (!this.getCapabilityValue('onoff')) { + this.setCapabilityValue('onoff', true); + } + if (typeof valueObj.light_hue !== 'undefined') { var hue_value = valueObj.light_hue; } else { @@ -112,6 +116,10 @@ class YeelightDevice extends Homey.Device { }, 500); this.registerCapabilityListener('light_temperature', (value, opts) => { + if (!this.getCapabilityValue('onoff')) { + this.setCapabilityValue('onoff', true); + } + if (this.getData().model == 'ceiling4') { var color_temp = yeelight.denormalize(value, 2700, 6000); } else if (this.getData().model == 'color') {