mirror of
https://github.com/home-assistant/core
synced 2024-09-28 03:04:04 +02:00
Prevent emulated hue discovery by hue component (#4819)
* Prevent emulated hue discovery Test for “HASS Bridge” in discovery info, pass if found, else try and setup the bridge. * Solved coding error Duplicate commands and return false added for component.
This commit is contained in:
parent
0aac4d64e1
commit
d02899216d
@ -90,6 +90,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
if discovery_info is not None:
|
||||
host = urlparse(discovery_info[1]).hostname
|
||||
|
||||
if "HASS Bridge" in discovery_info[0]:
|
||||
_LOGGER.info('Emulated hue found, will not add')
|
||||
return False
|
||||
else:
|
||||
host = config.get(CONF_HOST, None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user