From 79955a57853cfd9d499489f0f30e62fbef30dfdf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 13 Jul 2018 20:01:57 +0200 Subject: [PATCH] Catch the ValueError if the bulb was in the wrong mode (#15434) --- homeassistant/components/light/mystrom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/light/mystrom.py b/homeassistant/components/light/mystrom.py index 9abd96664f2..5d4cdcc17d4 100644 --- a/homeassistant/components/light/mystrom.py +++ b/homeassistant/components/light/mystrom.py @@ -155,7 +155,11 @@ class MyStromLight(Light): self._state = self._bulb.get_status() colors = self._bulb.get_color()['color'] - color_h, color_s, color_v = colors.split(';') + try: + color_h, color_s, color_v = colors.split(';') + except ValueError: + color_s, color_v = colors.split(';') + color_h = 0 self._color_h = int(color_h) self._color_s = int(color_s)