mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Change discovered from a list of dict to a dict
This commit is contained in:
@@ -27,10 +27,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
entities = []
|
entities = []
|
||||||
plm = hass.data['insteon_plm']
|
plm = hass.data['insteon_plm']
|
||||||
|
|
||||||
for device_info in discovery_info:
|
address = discovery_info['address']
|
||||||
address = device_info['address']
|
|
||||||
device = plm.devices[address]
|
device = plm.devices[address]
|
||||||
state_key = device_info['state_key']
|
state_key = discovery_info['state_key']
|
||||||
|
|
||||||
entities.append(InsteonPLMBinarySensor(device, state_key))
|
entities.append(InsteonPLMBinarySensor(device, state_key))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user