J. Nick Koston 2 лет назад
Родитель
Сommit
0a8a0bafb0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      switchbot/devices/bulb.py

+ 1 - 1
switchbot/devices/bulb.py

@@ -140,7 +140,7 @@ class SwitchbotBulb(SwitchbotDevice):
         self._state["r"] = result[3]
         self._state["g"] = result[4]
         self._state["b"] = result[5]
-        self._state["cw"] = int(result[6:7].hex(), 16)
+        self._state["cw"] = int(result[6:8].hex(), 16)
         _LOGGER.debug("%s: Bulb update state: %s = %s", self.name, result.hex(), self._state)
         self._fire_callbacks()