Netdisco now returns a dictionary while it used to be a tuple, fixed (#7350)

This commit is contained in:
Jason Carter 2017-04-29 23:54:45 -04:00 committed by Paulus Schoutsen
parent e4ebae55d5
commit 607394a0a0

View File

@ -43,13 +43,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
hosts = [] hosts = []
if discovery_info: if discovery_info:
host = discovery_info[0] host = discovery_info.get("host")
if host in KNOWN_HOSTS: if host in KNOWN_HOSTS:
return return
_LOGGER.debug('Discovered Roku: %s', host) _LOGGER.debug('Discovered Roku: %s', host)
hosts.append(discovery_info[0]) hosts.append(discovery_info.get("host"))
elif CONF_HOST in config: elif CONF_HOST in config:
hosts.append(config.get(CONF_HOST)) hosts.append(config.get(CONF_HOST))