Skip to content

Commit

Permalink
Set HAP properties for fan speed handling
Browse files Browse the repository at this point in the history
Closes #583
  • Loading branch information
kiwi-cam committed May 19, 2023
1 parent 6c58f09 commit c6bc848
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions accessories/fan.js
Expand Up @@ -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',
Expand Down

0 comments on commit c6bc848

Please sign in to comment.