Upgrade netdisco to 1.0.0rc2 (#7008)
* Upgrade netdisco to 1.0.0rc2 * fix tests
This commit is contained in:
parent
72a01b8a90
commit
edf500e66b
19 changed files with 82 additions and 74 deletions
|
@ -108,20 +108,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
lights.append(light)
|
||||
light_ips.append(ipaddr)
|
||||
|
||||
if discovery_info:
|
||||
device = {}
|
||||
# discovery_info: ip address,device id,device type
|
||||
device['ipaddr'] = discovery_info[0]
|
||||
device['name'] = discovery_info[1]
|
||||
# As we don't know protocol and mode set to none to autodetect.
|
||||
device[CONF_PROTOCOL] = None
|
||||
device[ATTR_MODE] = None
|
||||
|
||||
light = FluxLight(device)
|
||||
if light.is_valid:
|
||||
lights.append(light)
|
||||
light_ips.append(device['ipaddr'])
|
||||
|
||||
if not config.get(CONF_AUTOMATIC_ADD, False):
|
||||
add_devices(lights)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue