From 333dccc7afd170bfc1a8902b8d75531a49d3754a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 30 Jun 2020 15:01:30 +0200 Subject: [PATCH] Remove Hue configurator demo from demo integration (#37250) --- homeassistant/components/demo/__init__.py | 32 --------------------- homeassistant/components/demo/manifest.json | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/homeassistant/components/demo/__init__.py b/homeassistant/components/demo/__init__.py index 8121d493315..afba3e2878a 100644 --- a/homeassistant/components/demo/__init__.py +++ b/homeassistant/components/demo/__init__.py @@ -1,7 +1,6 @@ """Set up the demo environment that mimics interaction with devices.""" import asyncio import logging -import time from homeassistant import bootstrap, config_entries from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START @@ -136,37 +135,6 @@ async def async_setup(hass, config): "This is an example of a persistent notification.", title="Example Notification" ) - # Set up configurator - configurator_ids = [] - configurator = hass.components.configurator - - def hue_configuration_callback(data): - """Fake callback, mark config as done.""" - time.sleep(2) - - # First time it is called, pretend it failed. - if len(configurator_ids) == 1: - configurator.notify_errors( - configurator_ids[0], "Failed to register, please try again." - ) - - configurator_ids.append(0) - else: - configurator.request_done(configurator_ids[0]) - - request_id = configurator.async_request_config( - "Philips Hue", - hue_configuration_callback, - description=( - "Press the button on the bridge to register Philips " - "Hue with Home Assistant." - ), - description_image="/static/images/config_philips_hue.jpg", - fields=[{"id": "username", "name": "Username"}], - submit_caption="I have pressed the button", - ) - configurator_ids.append(request_id) - async def demo_start_listener(_event): """Finish set up.""" await finish_setup(hass, config) diff --git a/homeassistant/components/demo/manifest.json b/homeassistant/components/demo/manifest.json index 0abe5fb3347..697e6520d7d 100644 --- a/homeassistant/components/demo/manifest.json +++ b/homeassistant/components/demo/manifest.json @@ -2,7 +2,7 @@ "domain": "demo", "name": "Demo", "documentation": "https://www.home-assistant.io/integrations/demo", - "dependencies": ["conversation", "zone", "group", "configurator"], + "dependencies": ["conversation", "zone", "group"], "codeowners": ["@home-assistant/core"], "quality_scale": "internal" }