From 6d11c4269604e493aa00869b3c11b1f17cba9e87 Mon Sep 17 00:00:00 2001 From: Tom Harris Date: Wed, 21 Feb 2018 00:27:11 -0500 Subject: [PATCH] Change discovered from a list of dict to a dict --- homeassistant/components/binary_sensor/insteon_plm.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/binary_sensor/insteon_plm.py b/homeassistant/components/binary_sensor/insteon_plm.py index 6ce9538060a..e7bf93cbd60 100644 --- a/homeassistant/components/binary_sensor/insteon_plm.py +++ b/homeassistant/components/binary_sensor/insteon_plm.py @@ -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)