From dd33831cb19d03655d84fa8304b525a9db114924 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 15 Mar 2016 10:15:10 -0400 Subject: [PATCH] pass allow_unreachable all the way down the line --- homeassistant/components/light/hue.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index c77c74b2e63..03fe6ad1977 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -71,10 +71,10 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): if host in _CONFIGURING: return - setup_bridge(host, hass, add_devices_callback, filename) + setup_bridge(host, hass, add_devices_callback, filename, allow_unreachable) -def setup_bridge(host, hass, add_devices_callback, filename): +def setup_bridge(host, hass, add_devices_callback, filename, allow_unreachable): """Setup a phue bridge based on host parameter.""" import phue @@ -132,7 +132,7 @@ def setup_bridge(host, hass, add_devices_callback, filename): if light_id not in lights: lights[light_id] = HueLight(int(light_id), info, bridge, update_lights, - bridge_type=bridge_type) + bridge_type, allow_unreachable) new_lights.append(lights[light_id]) else: lights[light_id].info = info @@ -173,7 +173,7 @@ class HueLight(Light): # pylint: disable=too-many-arguments def __init__(self, light_id, info, bridge, update_lights, - bridge_type='hue'): + bridge_type='hue', allow_unreachable=False): """Initialize the light.""" self.light_id = light_id self.info = info @@ -181,6 +181,8 @@ class HueLight(Light): self.update_lights = update_lights self.bridge_type = bridge_type + self.allow_unreachable = allow_unreachable + @property def unique_id(self): """Return the ID of this Hue light."""