From b03c024f74bebcea319f22b3657a7a8bd0f63268 Mon Sep 17 00:00:00 2001 From: Bart S Date: Fri, 24 Nov 2017 02:26:36 +0100 Subject: [PATCH] Fix name collision when using multiple Hue bridges (#10486) * Fix name collision when using multiple Hue bridges See https://github.com/home-assistant/home-assistant/issues/9393 * Use new style of string formatting * Removed creating of "All Hue Lights" group --- homeassistant/components/light/hue.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index 6f4e948adea..fe7dd765d01 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -83,7 +83,6 @@ SCENE_SCHEMA = vol.Schema({ }) ATTR_IS_HUE_GROUP = "is_hue_group" -GROUP_NAME_ALL_HUE_LIGHTS = "All Hue Lights" CONFIG_INSTRUCTIONS = """ Press the button on the bridge to register Philips Hue with Home Assistant. @@ -210,21 +209,6 @@ def setup_bridge(host, hass, add_devices, filename, allow_unreachable, _LOGGER.error("Got unexpected result from Hue API") return - if not skip_groups: - # Group ID 0 is a special group in the hub for all lights, but it - # is not returned by get_api() so explicitly get it and include it. - # See https://developers.meethue.com/documentation/ - # groups-api#21_get_all_groups - _LOGGER.debug("Getting group 0 from bridge") - all_lights = bridge.get_group(0) - if not isinstance(all_lights, dict): - _LOGGER.error("Got unexpected result from Hue API for group 0") - return - # Hue hub returns name of group 0 as "Group 0", so rename - # for ease of use in HA. - all_lights['name'] = GROUP_NAME_ALL_HUE_LIGHTS - api_groups["0"] = all_lights - new_lights = [] api_name = api.get('config').get('name')