Merge pull request #5 from thomas-kaltenbach/master

Add fan characteristics
This commit is contained in:
Serge Wagener
2020-10-20 14:28:04 +02:00
committed by GitHub
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -88,6 +88,12 @@ You have to create a config.json in .homebridge directory. You'll find that dire
"type": "Fan", "type": "Fan",
"onoff": "OG.Bad.Ventilator" "onoff": "OG.Bad.Ventilator"
}, },
{
"name": "Lüftung",
"type": "Fan",
"onoff": "EG.Lüftung"
"rotationSpeed": "EG.LüftungSpeed"
},
{ {
"name": "Schalter", "name": "Schalter",
"type": "Switch", "type": "Switch",
+5
View File
@@ -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;
}, },