mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix interaction with hyperion on NodeMCU (#12872)
* Hyperion on NodeMCU has no 'activeEffects' entry * Hyperion on NodeMCU has non-empty 'activeLedColor' when light is turned off
This commit is contained in:
parent
cf8907ed0f
commit
ba20ffdde7
@ -213,9 +213,10 @@ class Hyperion(Light):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
if not response['info']['activeLedColor']:
|
||||
led_color = response['info']['activeLedColor']
|
||||
if not led_color or led_color[0]['RGB value'] == [0, 0, 0]:
|
||||
# Get the active effect
|
||||
if response['info']['activeEffects']:
|
||||
if response['info'].get('activeEffects'):
|
||||
self._rgb_color = [175, 0, 255]
|
||||
self._icon = 'mdi:lava-lamp'
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user