Fix hue lightgroups not syncing state (#5702)
This commit is contained in:
parent
2fcaf8bda6
commit
647a93801c
1 changed files with 5 additions and 2 deletions
|
@ -200,7 +200,8 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable,
|
||||||
|
|
||||||
for light_id, info in api_lights.items():
|
for light_id, info in api_lights.items():
|
||||||
if light_id not in lights:
|
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, update_lights,
|
||||||
bridge_type, allow_unreachable,
|
bridge_type, allow_unreachable,
|
||||||
allow_in_emulated_hue)
|
allow_in_emulated_hue)
|
||||||
|
@ -218,6 +219,7 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable,
|
||||||
|
|
||||||
if lightgroup_id not in lightgroups:
|
if lightgroup_id not in lightgroups:
|
||||||
lightgroups[lightgroup_id] = HueLight(
|
lightgroups[lightgroup_id] = HueLight(
|
||||||
|
hass,
|
||||||
int(lightgroup_id), info, bridge, update_lights,
|
int(lightgroup_id), info, bridge, update_lights,
|
||||||
bridge_type, allow_unreachable, allow_in_emulated_hue,
|
bridge_type, allow_unreachable, allow_in_emulated_hue,
|
||||||
True)
|
True)
|
||||||
|
@ -280,10 +282,11 @@ def request_configuration(host, hass, add_devices, filename,
|
||||||
class HueLight(Light):
|
class HueLight(Light):
|
||||||
"""Representation of a Hue 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,
|
bridge_type, allow_unreachable, allow_in_emulated_hue,
|
||||||
is_group=False):
|
is_group=False):
|
||||||
"""Initialize the light."""
|
"""Initialize the light."""
|
||||||
|
self.hass = hass
|
||||||
self.light_id = light_id
|
self.light_id = light_id
|
||||||
self.info = info
|
self.info = info
|
||||||
self.bridge = bridge
|
self.bridge = bridge
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue