mirror of
https://github.com/home-assistant/core.git
synced 2025-08-14 01:55:18 +02:00
Change discovered from a list of dict to a dict
This commit is contained in:
@@ -35,9 +35,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
entities = []
|
||||
plm = hass.data['insteon_plm']
|
||||
|
||||
address = device_info['address']
|
||||
address = discovery_info['address']
|
||||
device = plm.devices[address]
|
||||
state_key = device_info['state_key']
|
||||
state_key = discovery_info['state_key']
|
||||
|
||||
entities.append(InsteonPLMFan(device, state_key, SUPPORT_SET_SPEED))
|
||||
|
||||
|
@@ -25,10 +25,9 @@ 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']
|
||||
address = discovery_info['address']
|
||||
device = plm.devices[address]
|
||||
state_key = device_info['state_key']
|
||||
state_key = discovery_info['state_key']
|
||||
|
||||
entities.append(InsteonPLMDimmerDevice(device, state_key))
|
||||
|
||||
|
@@ -22,10 +22,9 @@ 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']
|
||||
address = discovery_info['address']
|
||||
device = plm.devices[address]
|
||||
state_key = device_info['state_key']
|
||||
state_key = discovery_info['state_key']
|
||||
|
||||
entities.append(InsteonPLMSensorDevice(device, state_key))
|
||||
|
||||
|
Reference in New Issue
Block a user