Merge pull request #5 from thomas-kaltenbach/master
Add fan characteristics
This commit is contained in:
commit
56cd8413f2
@ -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",
|
||||
|
||||
5
index.js
5
index.js
@ -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;
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user