From d02899216dae86c0b41d60ceefb4aab3a1be1222 Mon Sep 17 00:00:00 2001 From: Keaton Taylor Date: Fri, 9 Dec 2016 10:45:14 -0600 Subject: [PATCH] Prevent emulated hue discovery by hue component (#4819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- homeassistant/components/light/hue.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index 8fd8a6ef097..da2158ba78d 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -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)