Discovery is a dict rather than an array. (#6525)
parent
9ac3928600
commit
32dd815852
|
@ -53,8 +53,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||
password = config.get(CONF_PASSWORD)
|
||||
|
||||
if discovery_info is not None:
|
||||
host = discovery_info[0]
|
||||
port = None # Port is not collected in netdisco 0.8.1
|
||||
host = discovery_info.get("host")
|
||||
port = discovery_info.get("port")
|
||||
else:
|
||||
host = config.get(CONF_HOST)
|
||||
port = config.get(CONF_PORT)
|
||||
|
|
Loading…
Reference in New Issue