Skip to content

Commit

Permalink
Release 2.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed Nov 11, 2019
1 parent 30061da commit 070fd0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion APPSTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions drivers/yeelights/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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') {
Expand Down

0 comments on commit 070fd0e

Please sign in to comment.