From 3fce19b4b17a1d3af201dd82e505af2e10324f25 Mon Sep 17 00:00:00 2001 From: oliks <38727970+oliks@users.noreply.github.com> Date: Sat, 28 Apr 2018 23:25:56 +0200 Subject: [PATCH] Update index.js --- yeelight/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yeelight/index.js b/yeelight/index.js index e3a8eb4..15989ed 100755 --- a/yeelight/index.js +++ b/yeelight/index.js @@ -80,11 +80,11 @@ YeePlatform.prototype = { .on('set', function(value, callback) { that.exeCmd(dev.did, "brightness", value, callback);}) .value = dev.bright; - if (dev.model == "color" || dev.model == "stripe" || dev.model == "bedside") { - lightbulbService - .addCharacteristic(Characteristic.Hue) - .on('set', function(value, callback) { that.exeCmd(dev.did, "hue", value, callback);}) - .value = dev.hue; + { + lightbulbService + .addCharacteristic(Characteristic.Hue) + .on('set', function(value, callback) { that.exeCmd(dev.did, "hue", value, callback);}) + .value = dev.hue; lightbulbService .addCharacteristic(Characteristic.Saturation) @@ -97,7 +97,7 @@ YeePlatform.prototype = { .on('set', function(value, callback) { that.exeCmd(dev.did, "brightness", value, callback);}) .value = dev.bright; - if (dev.model == "color" || dev.model == "stripe" || dev.model == "bedside") { + { lightbulbService .getCharacteristic(Characteristic.Hue) .on('set', function(value, callback) { that.exeCmd(dev.did, "hue", value, callback);})