deCONZ improve options updating entities (#42320)

This commit is contained in:
Robert Svensson 2020-12-02 16:21:27 +01:00 committed by GitHub
parent ff4897a09e
commit ac2c01d20c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 53 deletions

View file

@ -16,7 +16,7 @@ async def async_setup_events(gateway) -> None:
"""Set up the deCONZ events."""
@callback
def async_add_sensor(sensors):
def async_add_sensor(sensors=gateway.api.sensors.values()):
"""Create DeconzEvent."""
for sensor in sensors:
@ -38,9 +38,7 @@ async def async_setup_events(gateway) -> None:
)
)
async_add_sensor(
[gateway.api.sensors[key] for key in sorted(gateway.api.sensors, key=int)]
)
async_add_sensor()
@callback