mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
deCONZ - Make sensors sorted on creation for deterministic order (#30569)
* Make sensors sorted on creation for deterministic order * Martins comment
This commit is contained in:
parent
31553796da
commit
0d48d682dc
@ -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):
|
class DeconzBinarySensor(DeconzDevice, BinarySensorDevice):
|
||||||
|
@ -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):
|
class DeconzSensor(DeconzDevice):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user