From 553920780f99c56dcbd3ee7dd7f61b48c0d81e18 Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Fri, 23 Mar 2018 18:22:48 +0100 Subject: [PATCH] Added default return value for HS_Color (#13395) --- homeassistant/components/homekit/type_lights.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homekit/type_lights.py b/homeassistant/components/homekit/type_lights.py index 6cd606981108dc..c723fcc08a6306 100644 --- a/homeassistant/components/homekit/type_lights.py +++ b/homeassistant/components/homekit/type_lights.py @@ -134,7 +134,8 @@ def update_state(self, entity_id=None, old_state=None, new_state=None): # Handle Color if CHAR_SATURATION in self.chars and CHAR_HUE in self.chars: - hue, saturation = new_state.attributes.get(ATTR_HS_COLOR) + hue, saturation = new_state.attributes.get( + ATTR_HS_COLOR, (None, None)) if not self._flag[RGB_COLOR] and ( hue != self._hue or saturation != self._saturation): self.char_hue.set_value(hue, should_callback=False)