1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Issue #23514 - fix invalid hue response (#23909)

Based on the discoveries in issue #23514, the periodic lack of response from emulated hue was due to an invalid value (null) being returned.
This commit is contained in:
Alex Bahm 2019-05-25 13:07:23 -07:00 committed by Paulus Schoutsen
parent 39ba99005a
commit 144b530045

View File

@ -453,7 +453,7 @@ def get_entity_state(config, entity):
if cached_state is None:
data[STATE_ON] = entity.state != STATE_OFF
if data[STATE_ON]:
data[STATE_BRIGHTNESS] = entity.attributes.get(ATTR_BRIGHTNESS)
data[STATE_BRIGHTNESS] = entity.attributes.get(ATTR_BRIGHTNESS, 0)
hue_sat = entity.attributes.get(ATTR_HS_COLOR, None)
if hue_sat is not None:
hue = hue_sat[0]