diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index a934788f36b..65ae9f30cf4 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -200,7 +200,8 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable, for light_id, info in api_lights.items(): if light_id not in lights: - lights[light_id] = HueLight(int(light_id), info, + lights[light_id] = HueLight(hass, + int(light_id), info, bridge, update_lights, bridge_type, allow_unreachable, allow_in_emulated_hue) @@ -218,6 +219,7 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable, if lightgroup_id not in lightgroups: lightgroups[lightgroup_id] = HueLight( + hass, int(lightgroup_id), info, bridge, update_lights, bridge_type, allow_unreachable, allow_in_emulated_hue, True) @@ -280,10 +282,11 @@ def request_configuration(host, hass, add_devices, filename, class HueLight(Light): """Representation of a Hue light.""" - def __init__(self, light_id, info, bridge, update_lights, + def __init__(self, hass, light_id, info, bridge, update_lights, bridge_type, allow_unreachable, allow_in_emulated_hue, is_group=False): """Initialize the light.""" + self.hass = hass self.light_id = light_id self.info = info self.bridge = bridge