home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.54k stars 30.35k forks source link

Flux LED Colorloop effect no longer works #64087

Closed OddyAte closed 2 years ago

OddyAte commented 2 years ago

The problem

When calling for the light.turn_on service with the "colorloop" effect the following error is shown:

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Pattern must be between 0x24 and 0x3a 23:45:00 – (ERROR) components/flux_led/light.py

What version of Home Assistant Core has the issue?

2021.12.9

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

flux_led

Link to integration documentation on our website

https://www.home-assistant.io/integrations/flux_led

Example YAML snippet

service: light.turn_on
data:
  effect: colorloop

Anything in the logs that might be useful for us?

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Pattern must be between 0x24 and 0x3a
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 381, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 584, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 494, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/flux_led/entity.py", line 79, in async_turn_on
    await self._async_turn_on(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/flux_led/light.py", line 290, in _async_turn_on
    await self._async_set_mode(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/flux_led/light.py", line 329, in _async_set_mode
    await self._async_set_effect(effect, brightness)
  File "/usr/src/homeassistant/homeassistant/components/flux_led/light.py", line 305, in _async_set_effect
    await self._device.async_set_effect(
  File "/usr/local/lib/python3.9/site-packages/flux_led/aiodevice.py", line 369, in async_set_effect
    await self.async_set_preset_pattern(
  File "/usr/local/lib/python3.9/site-packages/flux_led/aiodevice.py", line 348, in async_set_preset_pattern
    self._generate_preset_pattern(effect, speed, brightness)
  File "/usr/local/lib/python3.9/site-packages/flux_led/base_device.py", line 1136, in _generate_preset_pattern
    raise ValueError("Pattern must be between 0x24 and 0x3a")
ValueError: Pattern must be between 0x24 and 0x3a

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

flux_led documentation flux_led source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @icemanch, @bdraco, mind taking a look at this issue as it has been labeled with an integration (flux_led) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

bdraco commented 2 years ago

Which model are you doing this on?

OddyAte commented 2 years ago

It's this style, MagicHome controller with RGB only. It worked fine for a few years, also the other effects work.

image

bdraco commented 2 years ago

So likely a 0x33

bdraco commented 2 years ago

It looks like the newer models map colorloop to 0x25 and the older map it to 0x24 so it must be an older one since its being overwritten

bdraco commented 2 years ago

Yup, confirmed its broken on the older ones