deCONZ fix comments from #40265 (#40640)

* Use set not list

* Events are not entities

* Don't await unload_events

* Remove checks of entities content in tests

* List to set comprehension

* Why is it so hard to remember that sets arent parenthesis...
This commit is contained in:
Robert Svensson authored and GitHub committed 2020-09-27 11:02:45 +02:00
1 parent 8895752837
commit 66a8edb11e
12 files changed
+20 -67

No files matched your search

+1 -1
View File
@@ -96,7 +96,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
if sensor.battery is not None:
battery_handler.remove_tracker(sensor)
known_batteries = list(gateway.entities[DOMAIN])
known_batteries = set(gateway.entities[DOMAIN])
new_battery = DeconzBattery(sensor, gateway)
if new_battery.unique_id not in known_batteries:
entities.append(new_battery)