From 9fb4091a99caca01484febc3d355d4a8ac6497c5 Mon Sep 17 00:00:00 2001 From: thatsnasty Date: Sat, 2 Oct 2021 14:26:17 +1000 Subject: [PATCH] Update SimpleFanLightAccessory.js Fixes a dimer issue with Fan lights as discussed here: https://discord.com/channels/432663330281226270/688482670942093350/893439097643864075 Then add to your config: ``` "minBrightness": 2, "maxBrightness": 100, "minStep": 1 ``` --- lib/SimpleFanLightAccessory.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/SimpleFanLightAccessory.js b/lib/SimpleFanLightAccessory.js index b870ccb..4064b1f 100644 --- a/lib/SimpleFanLightAccessory.js +++ b/lib/SimpleFanLightAccessory.js @@ -59,9 +59,9 @@ class SimpleFanLightAccessory extends BaseAccessory { if (this.useBrightness) { characteristicBrightness = serviceLightbulb.getCharacteristic(Characteristic.Brightness) .setProps({ - minValue: 0, - maxValue: 1000, - minStep: 100 + minValue: this.minBrightness, + maxValue: this.maxBrightness, + minStep: this.minStep }) .updateValue(this.convertBrightnessFromTuyaToHomeKit(dps[this.dpBrightness])) .on('get', this.getBrightness.bind(this))