mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Insteon config (#5595)
* only check for devices when not defined in config * lint * performance fix
This commit is contained in:
parent
b4c3de3215
commit
6ede1c08ca
@ -38,6 +38,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
setup_light(device_id, conf_lights[device_id], insteonhub, hass,
|
||||
add_devices)
|
||||
|
||||
else:
|
||||
linked = insteonhub.get_linked()
|
||||
|
||||
for device_id in linked:
|
||||
@ -46,7 +47,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
request_configuration(device_id,
|
||||
insteonhub,
|
||||
linked[device_id]['model_name'] + ' ' +
|
||||
linked[device_id]['sku'], hass, add_devices)
|
||||
linked[device_id]['sku'],
|
||||
hass, add_devices)
|
||||
|
||||
|
||||
def request_configuration(device_id, insteonhub, model, hass,
|
||||
|
Loading…
x
Reference in New Issue
Block a user