From c17b460bf51554165c9e2a5c29ca5287d66e7614 Mon Sep 17 00:00:00 2001 From: Thomas Kaltenbach Date: Fri, 25 Sep 2020 20:46:43 +0200 Subject: [PATCH 1/2] Add fan characteristics 'RotationSpeed' This enable the control of rotation speed --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 461e858..f4898d4 100755 --- a/index.js +++ b/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; }, From 1aeabb631d8414d87fb04095cbbedabafdd5ba09 Mon Sep 17 00:00:00 2001 From: Thomas Kaltenbach Date: Fri, 25 Sep 2020 20:53:06 +0200 Subject: [PATCH 2/2] Add example for fan characteristics rotationSpeed --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4535b68..7481d23 100755 --- a/README.md +++ b/README.md @@ -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",