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
commit 56cd8413f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -88,6 +88,12 @@ You have to create a config.json in .homebridge directory. You'll find that dire
"type": "Fan",
"onoff": "OG.Bad.Ventilator"
},
{
"name": "Lüftung",
"type": "Fan",
"onoff": "EG.Lüftung"
"rotationSpeed": "EG.LüftungSpeed"
},
{
"name": "Schalter",
"type": "Switch",

View File

@ -498,6 +498,11 @@ SmartHomeNGAccessory.prototype = {
this.log("["+ this.name +"] Fan on/off characteristic enabled");
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;
},