From c6bc848d7d2aa47c67b67cea7ef43ffdf8abe845 Mon Sep 17 00:00:00 2001 From: Cameron <32912464+kiwi-cam@users.noreply.github.com> Date: Fri, 19 May 2023 12:52:02 +1200 Subject: [PATCH] Set HAP properties for fan speed handling Closes #583 --- accessories/fan.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/accessories/fan.js b/accessories/fan.js index 6afc18e6..8b200bae 100644 --- a/accessories/fan.js +++ b/accessories/fan.js @@ -233,6 +233,13 @@ class FanAccessory extends SwitchAccessory { } }); + // Add HAP properties for improved accessory representation in Homekit + this.getCharacteristic(Characteristic.RotationSpeed).setProps({ + minStep: config.stepSize, + minValue: 0, + maxValue: 100 + }); + if (config.showRotationDirection) { this.serviceManager.addToggleCharacteristic({ name: 'rotationDirection',