Skip to content

Commit

Permalink
Merge pull request #40 from BasKiers/feat/ceiling1-support
Browse files Browse the repository at this point in the history
feat: added support for model 'ceiling1'
  • Loading branch information
jghaanstra authored Jun 30, 2018
2 parents 543802e + 3230d9a commit 6edd7ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/yeelights/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
}
Expand Down Expand Up @@ -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 + ')';
Expand Down

0 comments on commit 6edd7ac

Please sign in to comment.