Skip to content

Commit

Permalink
deCONZ - Race condition on slower systems (#32274)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kane610 authored and balloob committed Feb 27, 2020
1 parent f43b26f commit a5d9e89
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion homeassistant/components/deconz/binary_sensor.py
Expand Up @@ -37,7 +37,6 @@ def async_add_sensor(sensors, new=True):
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))

Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/deconz/climate.py
Expand Up @@ -44,7 +44,6 @@ def async_add_climate(sensors, new=True):
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))

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/deconz/light.py
Expand Up @@ -67,7 +67,7 @@ def async_add_group(groups):
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)
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/deconz/sensor.py
Expand Up @@ -68,7 +68,6 @@ def async_add_sensor(sensors, new=True):
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))

Expand Down

0 comments on commit a5d9e89

Please sign in to comment.