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 offpull/12890/head
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…
Reference in New Issue