Add fan characteristics 'RotationSpeed'
This enable the control of rotation speed
This commit is contained in:
parent
0155a5557e
commit
c17b460bf5
5
index.js
5
index.js
@ -498,6 +498,11 @@ SmartHomeNGAccessory.prototype = {
|
|||||||
this.log("["+ this.name +"] Fan on/off characteristic enabled");
|
this.log("["+ this.name +"] Fan on/off characteristic enabled");
|
||||||
this.bindCharacteristic(myService, Characteristic.On, "Bool", config.onoff, inverted);
|
this.bindCharacteristic(myService, Characteristic.On, "Bool", config.onoff, inverted);
|
||||||
}
|
}
|
||||||
|
// RotationSpeed
|
||||||
|
if (config.rotationSpeed) {
|
||||||
|
this.log("["+ this.name +"] Fan rotationSpeed characteristic enabled");
|
||||||
|
this.bindCharacteristic(myService, Characteristic.RotationSpeed, "Percent", config.rotationSpeed, inverted);
|
||||||
|
}
|
||||||
return myService;
|
return myService;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user