deCONZ - Make sensors sorted on creation for deterministic order (#30569)

* Make sensors sorted on creation for deterministic order

* Martins comment
pull/30579/head
Robert Svensson 2020-01-08 09:30:02 +01:00 committed by GitHub
parent 31553796da
commit 0d48d682dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -45,7 +45,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
)
)
async_add_sensor(gateway.api.sensors.values())
async_add_sensor(
[gateway.api.sensors[key] for key in sorted(gateway.api.sensors, key=int)]
)
class DeconzBinarySensor(DeconzDevice, BinarySensorDevice):

View File

@ -88,7 +88,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
)
)
async_add_sensor(gateway.api.sensors.values())
async_add_sensor(
[gateway.api.sensors[key] for key in sorted(gateway.api.sensors, key=int)]
)
class DeconzSensor(DeconzDevice):