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.6k stars 30.36k forks source link

flux_led (better) support for MagicHome LED SPI Controller #36941

Closed Megachip closed 4 years ago

Megachip commented 4 years ago

The problem

I can switch it On and off, but on most other commands, I've got an error. Also its not possible to use any of the neopixel/ws281x effects.

Environment

Problem-relevant configuration.yaml

light:
  - platform: flux_led
    automatic_add: True

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 471, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 434, in state_attributes
    data[ATTR_EFFECT] = self.effect
  File "/usr/src/homeassistant/homeassistant/components/flux_led/light.py", line 266, in effect
    current_mode = self._bulb.raw_state[3]
TypeError: 'NoneType' object is not subscriptable

Additional information

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

flux_led documentation flux_led source (message by IssueLinks)

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

bdraco commented 2 years ago

2022.1 should have support for these