From d4310f0d7078d6fb826f17d2f0cdfc55933d3560 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 5 Jan 2022 08:16:08 +0100 Subject: [PATCH] Remove groups.yaml from default config (#63366) Co-authored-by: Paulus Schoutsen --- homeassistant/config.py | 6 ------ tests/test_config.py | 5 ----- 2 files changed, 11 deletions(-) diff --git a/homeassistant/config.py b/homeassistant/config.py index 3d1ff4f3c1d3..448d1d4c637f 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -94,7 +94,6 @@ default_config: tts: - platform: google_translate -group: !include {GROUP_CONFIG_PATH} automation: !include {AUTOMATION_CONFIG_PATH} script: !include {SCRIPT_CONFIG_PATH} scene: !include {SCENE_CONFIG_PATH} @@ -298,7 +297,6 @@ def _write_default_config(config_dir: str) -> bool: config_path = os.path.join(config_dir, YAML_CONFIG_FILE) secret_path = os.path.join(config_dir, SECRET_YAML) version_path = os.path.join(config_dir, VERSION_FILE) - group_yaml_path = os.path.join(config_dir, GROUP_CONFIG_PATH) automation_yaml_path = os.path.join(config_dir, AUTOMATION_CONFIG_PATH) script_yaml_path = os.path.join(config_dir, SCRIPT_CONFIG_PATH) scene_yaml_path = os.path.join(config_dir, SCENE_CONFIG_PATH) @@ -316,10 +314,6 @@ def _write_default_config(config_dir: str) -> bool: with open(version_path, "wt", encoding="utf8") as version_file: version_file.write(__version__) - if not os.path.isfile(group_yaml_path): - with open(group_yaml_path, "wt", encoding="utf8"): - pass - if not os.path.isfile(automation_yaml_path): with open(automation_yaml_path, "wt", encoding="utf8") as automation_file: automation_file.write("[]") diff --git a/tests/test_config.py b/tests/test_config.py index cd77b80e3ae0..41e9bc500380 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -41,7 +41,6 @@ CONFIG_DIR = get_test_config_dir() YAML_PATH = os.path.join(CONFIG_DIR, config_util.YAML_CONFIG_FILE) SECRET_PATH = os.path.join(CONFIG_DIR, SECRET_YAML) VERSION_PATH = os.path.join(CONFIG_DIR, config_util.VERSION_FILE) -GROUP_PATH = os.path.join(CONFIG_DIR, config_util.GROUP_CONFIG_PATH) AUTOMATIONS_PATH = os.path.join(CONFIG_DIR, config_util.AUTOMATION_CONFIG_PATH) SCRIPTS_PATH = os.path.join(CONFIG_DIR, config_util.SCRIPT_CONFIG_PATH) SCENES_PATH = os.path.join(CONFIG_DIR, config_util.SCENE_CONFIG_PATH) @@ -67,9 +66,6 @@ def teardown(): if os.path.isfile(VERSION_PATH): os.remove(VERSION_PATH) - if os.path.isfile(GROUP_PATH): - os.remove(GROUP_PATH) - if os.path.isfile(AUTOMATIONS_PATH): os.remove(AUTOMATIONS_PATH) @@ -87,7 +83,6 @@ async def test_create_default_config(hass): assert os.path.isfile(YAML_PATH) assert os.path.isfile(SECRET_PATH) assert os.path.isfile(VERSION_PATH) - assert os.path.isfile(GROUP_PATH) assert os.path.isfile(AUTOMATIONS_PATH)