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