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
pull/32282/head
Robert Svensson 2020-02-27 20:48:01 +01:00 committed by Paulus Schoutsen
parent f43b26f250
commit a5d9e89d08
4 changed files with 1 additions and 4 deletions

View File

@ -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))

View File

@ -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))

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)

View File

@ -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))