Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mharyst committed Sep 8, 2019
1 parent 48ed628 commit e86645d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ YeePlatform.prototype = {
var found = 0;
var newAccessory = null;
var lightbulbService = null;
var nightModeService = null;
var name;

for (var index in this.yeeAccessories) {
Expand Down Expand Up @@ -111,11 +112,13 @@ YeePlatform.prototype = {
}

if (dev.model == 'ceiling3' || dev.model == 'ceiling4') {
nightModeService = new Service.Switch('Night Mode');
lightbulbService
var nighModeName = 'Night Mode'
nightModeService = new Service.Switch(nighModeName);
nightModeService
.getCharacteristic(Characteristic.On)
.on('set', function(value, callback) { that.exeCmd(dev.did, "moon", value, callback);})
.value = 0;
newAccessory.addService(nightModeService, nighModeName);
}


Expand Down

0 comments on commit e86645d

Please sign in to comment.