Support WeMo "Light" services

This commit is contained in:
Nick Farina
2015-10-05 17:29:53 -07:00
parent b66610ce93
commit feca9fbf0d

View File

@@ -144,6 +144,16 @@ WeMoAccessory.prototype.getServices = function() {
return [garageDoorService];
}
else if (this.service == "Light") {
var lightbulbService = new Service.Lightbulb(this.name);
lightbulbService
.getCharacteristic(Characteristic.On)
.on('get', this.getPowerOn.bind(this))
.on('set', this.setPowerOn.bind(this));
return [lightbulbService];
}
else if (this.service == "MotionSensor") {
var motionSensorService = new Service.MotionSensor(this.name);