mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Add deCONZ entities in a predicitive order (#11712)
* Make sure that entities names are created in a predicitive order * Debug print for deconz config parameters * Bump requirement to v25
This commit is contained in:
committed by
Paulus Schoutsen
parent
aac01cb096
commit
8bcaf832ae
@@ -25,8 +25,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
sensors = hass.data[DECONZ_DATA].sensors
|
||||
entities = []
|
||||
|
||||
for sensor in sensors.values():
|
||||
if sensor.type in DECONZ_BINARY_SENSOR:
|
||||
for key in sorted(sensors.keys(), key=int):
|
||||
sensor = sensors[key]
|
||||
if sensor and sensor.type in DECONZ_BINARY_SENSOR:
|
||||
entities.append(DeconzBinarySensor(sensor))
|
||||
async_add_devices(entities, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user