Discovery is a dict rather than an array. (#6525)

pull/6529/head^2
Greg Dowling 2017-03-11 18:39:26 +00:00 committed by Paulus Schoutsen
parent 9ac3928600
commit 32dd815852
1 changed files with 2 additions and 2 deletions

View File

@ -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)