Fix hue lightgroups not syncing state (#5702)
parent
2fcaf8bda6
commit
647a93801c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue