From e2e001d04246d50cf0b872c032abbdb8b7fffd56 Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Wed, 29 May 2019 23:34:44 +0200 Subject: [PATCH] Keep integrations in discovery (#24179) * Keep integrations that have been migrated to new discovery methods to avoid breaking changes * Additional migrated services --- homeassistant/components/discovery/__init__.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/discovery/__init__.py b/homeassistant/components/discovery/__init__.py index 54f7e1bf3de..ee6a8590515 100644 --- a/homeassistant/components/discovery/__init__.py +++ b/homeassistant/components/discovery/__init__.py @@ -96,8 +96,18 @@ OPTIONAL_SERVICE_HANDLERS = { SERVICE_DLNA_DMR: ('media_player', 'dlna_dmr'), } -DEFAULT_ENABLED = list(CONFIG_ENTRY_HANDLERS) + list(SERVICE_HANDLERS) -DEFAULT_DISABLED = list(OPTIONAL_SERVICE_HANDLERS) +MIGRATED_SERVICE_HANDLERS = { + 'axis': None, + 'esphome': None, + 'ikea_tradfri': None, + 'homekit': None, + 'philips_hue': None +} + +DEFAULT_ENABLED = list(CONFIG_ENTRY_HANDLERS) + list(SERVICE_HANDLERS) + \ + list(MIGRATED_SERVICE_HANDLERS) +DEFAULT_DISABLED = list(OPTIONAL_SERVICE_HANDLERS) + \ + list(MIGRATED_SERVICE_HANDLERS) CONF_IGNORE = 'ignore' CONF_ENABLE = 'enable' @@ -144,6 +154,9 @@ async def async_setup(hass, config): async def new_service_found(service, info): """Handle a new service if one is found.""" + if service in MIGRATED_SERVICE_HANDLERS: + return + if service in ignored_platforms: logger.info("Ignoring service: %s %s", service, info) return