Streamline setup of deCONZ binary sensor platform (#71820)

This commit is contained in:
Robert Svensson 2022-05-17 00:04:57 +02:00 committed by GitHub
parent 03e98a9a32
commit 007c6d2236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 89 additions and 54 deletions

View file

@ -106,7 +106,7 @@ async def async_setup_entry(
config_entry.async_on_unload(
gateway.api.sensors.thermostat.subscribe(
async_add_climate,
gateway.evaluate_add_device(async_add_climate),
EventType.ADDED,
)
)
@ -115,7 +115,7 @@ async def async_setup_entry(
@callback
def async_reload_clip_sensors() -> None:
"""Load clip climate sensors from deCONZ."""
"""Load clip sensors from deCONZ."""
for climate_id, climate in gateway.api.sensors.thermostat.items():
if climate.type.startswith("CLIP"):
async_add_climate(EventType.ADDED, climate_id)