diff --git a/drivers/yeelights/driver.js b/drivers/yeelights/driver.js index 4303ba6..fb54875 100644 --- a/drivers/yeelights/driver.js +++ b/drivers/yeelights/driver.js @@ -8,7 +8,7 @@ const typeCapabilityMap = { 'color' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode' ], 'stripe' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode' ], 'bslamp' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode' ], - 'ceiling' : [ 'onoff', 'dim', 'light_temperature', 'light_mode' ], + 'ceiling' : [ 'onoff', 'dim', 'light_temperature', 'light_mode', 'night_mode' ], 'ceiling4' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode' ], 'desklamp' : [ 'onoff', 'dim', 'light_temperature', 'light_mode' ] } @@ -42,7 +42,11 @@ class YeelightDriver extends Homey.Driver { var name = Homey.__('yeelight_led_strip')+ ' (' + result[i].address + ')'; } else if (result[i].model == 'bslamp') { var name = Homey.__('yeelight_bedside_lamp')+ ' (' + result[i].address + ')'; - } else if (result[i].model == 'ceiling' || result[i].model == 'ceiling4') { + } else if (result[i].model.startsWith('ceiling')) { + if(result[i].model !== 'ceiling4') { + // Default the ceiling light to the default ceiling light. + result[i].model = 'ceiling'; + } var name = Homey.__('yeelight_ceiling_light')+ ' (' + result[i].address + ')'; } else if (result[i].model == 'desklamp') { var name = Homey.__('yeelight_desklamp')+ ' (' + result[i].address + ')';