mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 01:28:24 +00:00
deCONZ - Race condition on slower systems (#32274)
When battery sensors gets created before other platforms loading deconz sensors gets created first the other platform would not create entities related to those battery sensors
This commit is contained in:
parent
f43b26f250
commit
a5d9e89d08
@ -37,7 +37,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
gateway.option_allow_clip_sensor
|
||||
or not sensor.type.startswith("CLIP")
|
||||
)
|
||||
and sensor.deconz_id not in gateway.deconz_ids.values()
|
||||
):
|
||||
entities.append(DeconzBinarySensor(sensor, gateway))
|
||||
|
||||
|
@ -44,7 +44,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
gateway.option_allow_clip_sensor
|
||||
or not sensor.type.startswith("CLIP")
|
||||
)
|
||||
and sensor.deconz_id not in gateway.deconz_ids.values()
|
||||
):
|
||||
entities.append(DeconzThermostat(sensor, gateway))
|
||||
|
||||
|
@ -67,7 +67,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
entities = []
|
||||
|
||||
for group in groups:
|
||||
if group.lights and group.deconz_id not in gateway.deconz_ids.values():
|
||||
if group.lights:
|
||||
entities.append(DeconzGroup(group, gateway))
|
||||
|
||||
async_add_entities(entities, True)
|
||||
|
@ -68,7 +68,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
gateway.option_allow_clip_sensor
|
||||
or not sensor.type.startswith("CLIP")
|
||||
)
|
||||
and sensor.deconz_id not in gateway.deconz_ids.values()
|
||||
):
|
||||
entities.append(DeconzSensor(sensor, gateway))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user