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:
Robert Svensson authored and Paulus Schoutsen committed 2020-02-27 14:02:59 -08:00
1 parent f43b26f250
commit a5d9e89d08
4 files changed
+1 -4

No files matched your search

@@ -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))
+1 -1
View File
@@ -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))