From 144b5300457b8845a20deec93f8a378e628d2553 Mon Sep 17 00:00:00 2001 From: Alex Bahm Date: Sat, 25 May 2019 13:07:23 -0700 Subject: [PATCH] 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. --- homeassistant/components/emulated_hue/hue_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/emulated_hue/hue_api.py b/homeassistant/components/emulated_hue/hue_api.py index 44a9c6e53ef..632fdab12a4 100644 --- a/homeassistant/components/emulated_hue/hue_api.py +++ b/homeassistant/components/emulated_hue/hue_api.py @@ -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]