diff --git a/src/bonaparte/const.py b/src/bonaparte/const.py index 3f365d1..7cb6896 100644 --- a/src/bonaparte/const.py +++ b/src/bonaparte/const.py @@ -117,8 +117,8 @@ class LedState(MultiValueEnum): _init_ = "short long" - OFF = 0x00, "0x000000" - ON = 0xFF, 0xFFFFFF + OFF = 0x00, bytes([0, 0, 0]) + ON = 0xFF, bytes([0xFF, 0xFF, 0xFF]) class LedMode(MultiValueEnum): @@ -126,6 +126,6 @@ class LedMode(MultiValueEnum): _init_ = "short long setvalue" - CYCLE = 0x01, 0x010101, 0x20 - HOLD = 0x02, 0x020202, 0x30 - EMBER_BED = 0xFF, 0xFFFFFF, 0x10 + CYCLE = 0x01, bytes([0x01, 0x01, 0x01]), 0x20 + HOLD = 0x02, bytes([0x02, 0x02, 0x02]), 0x30 + EMBER_BED = 0xFF, bytes([0xFF, 0xFF, 0xFF]), 0x10 diff --git a/src/bonaparte/fireplace.py b/src/bonaparte/fireplace.py index e414cf5..92baca6 100644 --- a/src/bonaparte/fireplace.py +++ b/src/bonaparte/fireplace.py @@ -530,7 +530,7 @@ async def update_led_controller_mode(self) -> None: """Update the mode of the LED colors.""" result = await self.execute_command(EfireCommand.GET_LED_MODE) - self._state.led_mode = LedMode(int.from_bytes(result, "big")) + self._state.led_mode = LedMode(bytes(result)) # E3 @needs_auth