From 8582e390f837fa554da02c14b72c197b6ff1496a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 9 Apr 2019 14:45:09 -0700 Subject: [PATCH] Remove introduction component (#22944) * Remove introduction component * Remove more usage --- CODEOWNERS | 1 - homeassistant/bootstrap.py | 1 - homeassistant/components/demo/__init__.py | 2 +- homeassistant/components/demo/manifest.json | 1 - .../components/introduction/__init__.py | 56 ------------------- .../components/introduction/manifest.json | 10 ---- homeassistant/config.py | 3 - tests/components/introduction/__init__.py | 1 - tests/components/introduction/test_init.py | 23 -------- 9 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 homeassistant/components/introduction/__init__.py delete mode 100644 homeassistant/components/introduction/manifest.json delete mode 100644 tests/components/introduction/__init__.py delete mode 100644 tests/components/introduction/test_init.py diff --git a/CODEOWNERS b/CODEOWNERS index 033f8331ebf..2a0548a4ded 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -109,7 +109,6 @@ homeassistant/components/input_number/* @home-assistant/core homeassistant/components/input_select/* @home-assistant/core homeassistant/components/input_text/* @home-assistant/core homeassistant/components/integration/* @dgomes -homeassistant/components/introduction/* @home-assistant/core homeassistant/components/ios/* @robbiet480 homeassistant/components/ipma/* @dgomes homeassistant/components/irish_rail_transport/* @ttroy50 diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index c27dde9f940..a8c6d773291 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -35,7 +35,6 @@ FIRST_INIT_COMPONENT = { 'recorder', 'mqtt', 'mqtt_eventstream', - 'introduction', 'frontend', 'history', } diff --git a/homeassistant/components/demo/__init__.py b/homeassistant/components/demo/__init__.py index 2699ade0b1d..70c1341145d 100644 --- a/homeassistant/components/demo/__init__.py +++ b/homeassistant/components/demo/__init__.py @@ -6,7 +6,7 @@ from homeassistant import bootstrap import homeassistant.core as ha from homeassistant.const import ATTR_ENTITY_ID, CONF_PLATFORM -DEPENDENCIES = ['conversation', 'introduction', 'zone'] +DEPENDENCIES = ['conversation', 'zone'] DOMAIN = 'demo' COMPONENTS_WITH_DEMO_PLATFORM = [ diff --git a/homeassistant/components/demo/manifest.json b/homeassistant/components/demo/manifest.json index 859cac597dc..ab079a4c2ee 100644 --- a/homeassistant/components/demo/manifest.json +++ b/homeassistant/components/demo/manifest.json @@ -5,7 +5,6 @@ "requirements": [], "dependencies": [ "conversation", - "introduction", "zone" ], "codeowners": [ diff --git a/homeassistant/components/introduction/__init__.py b/homeassistant/components/introduction/__init__.py deleted file mode 100644 index 8a2d72ebbdd..00000000000 --- a/homeassistant/components/introduction/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -"""Component that will help guide the user taking its first steps.""" -import logging - -import voluptuous as vol - -DOMAIN = 'introduction' - -CONFIG_SCHEMA = vol.Schema({ - DOMAIN: vol.Schema({}), -}, extra=vol.ALLOW_EXTRA) - - -async def async_setup(hass, config=None): - """Set up the introduction component.""" - log = logging.getLogger(__name__) - log.info(""" - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Hello, and welcome to Home Assistant! - - We'll hope that we can make all your dreams come true. - - Here are some resources to get started: - - - Configuring Home Assistant: - https://home-assistant.io/getting-started/configuration/ - - - Available components: - https://home-assistant.io/components/ - - - Troubleshooting your configuration: - https://home-assistant.io/getting-started/troubleshooting-configuration/ - - - Getting help: - https://home-assistant.io/help/ - - This message is generated by the introduction component. You can - disable it in configuration.yaml. - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - """) - - hass.components.persistent_notification.async_create(""" -Here are some resources to get started: - - - [Configuring Home Assistant](https://home-assistant.io/getting-started/configuration/) - - [Available components](https://home-assistant.io/components/) - - [Troubleshooting your configuration](https://home-assistant.io/docs/configuration/troubleshooting/) - - [Getting help](https://home-assistant.io/help/) - -To not see this card popup in the future, edit your config in -`configuration.yaml` and disable the `introduction` component. -""", 'Welcome Home!') # noqa - - return True diff --git a/homeassistant/components/introduction/manifest.json b/homeassistant/components/introduction/manifest.json deleted file mode 100644 index 4caa31e34e6..00000000000 --- a/homeassistant/components/introduction/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "domain": "introduction", - "name": "Introduction", - "documentation": "https://www.home-assistant.io/components/introduction", - "requirements": [], - "dependencies": [], - "codeowners": [ - "@home-assistant/core" - ] -} diff --git a/homeassistant/config.py b/homeassistant/config.py index 19b8087e538..fe7f904a4b5 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -68,9 +68,6 @@ DEFAULT_CONFIG = """ # Configure a default setup of Home Assistant (frontend, api, etc) default_config: -# Show the introduction message on startup. -introduction: - # Uncomment this if you are using SSL/TLS, running in Docker container, etc. # http: # base_url: example.duckdns.org:8123 diff --git a/tests/components/introduction/__init__.py b/tests/components/introduction/__init__.py deleted file mode 100644 index 99cea29581c..00000000000 --- a/tests/components/introduction/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Tests for the introduction component.""" diff --git a/tests/components/introduction/test_init.py b/tests/components/introduction/test_init.py deleted file mode 100644 index c414ab97ae1..00000000000 --- a/tests/components/introduction/test_init.py +++ /dev/null @@ -1,23 +0,0 @@ -"""The tests for the Introduction component.""" -import unittest - -from homeassistant.setup import setup_component -from homeassistant.components import introduction - -from tests.common import get_test_home_assistant - - -class TestIntroduction(unittest.TestCase): - """Test Introduction.""" - - def setUp(self): - """Set up things to be run when tests are started.""" - self.hass = get_test_home_assistant() - - def tearDown(self): - """Stop down everything that was started.""" - self.hass.stop() - - def test_setup(self): - """Test introduction setup.""" - assert setup_component(self.hass, introduction.DOMAIN, {})