koying / openrgb_ha

OpenRGB integration for Home Assistant
110 stars 16 forks source link

Individual LED show as unavailable #15

Open andrerenard opened 2 years ago

andrerenard commented 2 years ago

I'm running into a problem where all my individual LED entries become "unavailable".

If I go into the Entities menu, and manually select each LED via the "related entities list" for the primary group, and set the brightness, then it becomes available.

I'm not sure if it's related, but I'm getting these errors in the logs. So perhaps there is something breaking before it gets to updating the state of the individual LEDs.

2022-01-16 13:44:18 ERROR (MainThread) [homeassistant.components.light] Error while setting up openrgb platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 747, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/openrgb/light.py", line 350, in async_added_to_hass
if self._attr_unique_id not in self.hass.data[DOMAIN]["devices"][object_id]:
KeyError: 'ene_dram_0'
HydrelioxGitHub commented 2 years ago

Same issue here, all indidual leds are unavailable. But the main light is still usable. image