From 397238372efe7e74613c49c4c542a39d0e49f8df Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 16 Mar 2020 14:47:44 -0700 Subject: [PATCH] Remove group as a dependency from entity integrations (#32870) * remove group dependency * Update device sun light trigger * Add zone dep back to device tracker --- homeassistant/components/automation/manifest.json | 3 ++- homeassistant/components/cover/manifest.json | 2 +- .../components/device_sun_light_trigger/manifest.json | 3 ++- homeassistant/components/device_tracker/manifest.json | 3 ++- homeassistant/components/fan/manifest.json | 2 +- homeassistant/components/light/manifest.json | 2 +- homeassistant/components/lock/manifest.json | 2 +- homeassistant/components/plant/manifest.json | 2 +- homeassistant/components/remote/manifest.json | 2 +- homeassistant/components/script/manifest.json | 2 +- homeassistant/components/switch/manifest.json | 2 +- homeassistant/components/vacuum/manifest.json | 2 +- script/hassfest/dependencies.py | 4 ++-- script/hassfest/manifest.py | 4 ++-- 14 files changed, 19 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/automation/manifest.json b/homeassistant/components/automation/manifest.json index 34261cba5a9..48d8c58dfe1 100644 --- a/homeassistant/components/automation/manifest.json +++ b/homeassistant/components/automation/manifest.json @@ -3,7 +3,8 @@ "name": "Automation", "documentation": "https://www.home-assistant.io/integrations/automation", "requirements": [], - "dependencies": ["device_automation", "group", "webhook"], + "dependencies": [], + "after_dependencies": ["device_automation", "webhook"], "codeowners": ["@home-assistant/core"], "quality_scale": "internal" } diff --git a/homeassistant/components/cover/manifest.json b/homeassistant/components/cover/manifest.json index aa43e934dc9..788d72b707f 100644 --- a/homeassistant/components/cover/manifest.json +++ b/homeassistant/components/cover/manifest.json @@ -3,7 +3,7 @@ "name": "Cover", "documentation": "https://www.home-assistant.io/integrations/cover", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": ["@home-assistant/core"], "quality_scale": "internal" } diff --git a/homeassistant/components/device_sun_light_trigger/manifest.json b/homeassistant/components/device_sun_light_trigger/manifest.json index 702f8704564..edeb10dcec2 100644 --- a/homeassistant/components/device_sun_light_trigger/manifest.json +++ b/homeassistant/components/device_sun_light_trigger/manifest.json @@ -3,7 +3,8 @@ "name": "Presence-based Lights", "documentation": "https://www.home-assistant.io/integrations/device_sun_light_trigger", "requirements": [], - "dependencies": ["device_tracker", "group", "light", "person"], + "dependencies": [], + "after_dependencies": ["device_tracker", "group", "light", "person"], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/device_tracker/manifest.json b/homeassistant/components/device_tracker/manifest.json index 35b9a4a3fdb..4bd9846f76d 100644 --- a/homeassistant/components/device_tracker/manifest.json +++ b/homeassistant/components/device_tracker/manifest.json @@ -3,7 +3,8 @@ "name": "Device Tracker", "documentation": "https://www.home-assistant.io/integrations/device_tracker", "requirements": [], - "dependencies": ["group", "zone"], + "dependencies": ["zone"], + "after_dependencies": [], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/fan/manifest.json b/homeassistant/components/fan/manifest.json index 02ed368feac..53b7873612c 100644 --- a/homeassistant/components/fan/manifest.json +++ b/homeassistant/components/fan/manifest.json @@ -3,7 +3,7 @@ "name": "Fan", "documentation": "https://www.home-assistant.io/integrations/fan", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/light/manifest.json b/homeassistant/components/light/manifest.json index e0a9652a10c..64e21654afd 100644 --- a/homeassistant/components/light/manifest.json +++ b/homeassistant/components/light/manifest.json @@ -3,7 +3,7 @@ "name": "Light", "documentation": "https://www.home-assistant.io/integrations/light", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/lock/manifest.json b/homeassistant/components/lock/manifest.json index ab05166d15f..cd2fdf27f2d 100644 --- a/homeassistant/components/lock/manifest.json +++ b/homeassistant/components/lock/manifest.json @@ -3,7 +3,7 @@ "name": "Lock", "documentation": "https://www.home-assistant.io/integrations/lock", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/plant/manifest.json b/homeassistant/components/plant/manifest.json index de5f0c1f880..f0ff20f3759 100644 --- a/homeassistant/components/plant/manifest.json +++ b/homeassistant/components/plant/manifest.json @@ -3,7 +3,7 @@ "name": "Plant Monitor", "documentation": "https://www.home-assistant.io/integrations/plant", "requirements": [], - "dependencies": ["group", "zone"], + "dependencies": [], "after_dependencies": ["recorder"], "codeowners": ["@ChristianKuehnel"], "quality_scale": "internal" diff --git a/homeassistant/components/remote/manifest.json b/homeassistant/components/remote/manifest.json index 24616bc5947..8f559b758d6 100644 --- a/homeassistant/components/remote/manifest.json +++ b/homeassistant/components/remote/manifest.json @@ -3,6 +3,6 @@ "name": "Remote", "documentation": "https://www.home-assistant.io/integrations/remote", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [] } diff --git a/homeassistant/components/script/manifest.json b/homeassistant/components/script/manifest.json index dac37110172..ce9899f021c 100644 --- a/homeassistant/components/script/manifest.json +++ b/homeassistant/components/script/manifest.json @@ -3,7 +3,7 @@ "name": "Scripts", "documentation": "https://www.home-assistant.io/integrations/script", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": ["@home-assistant/core"], "quality_scale": "internal" } diff --git a/homeassistant/components/switch/manifest.json b/homeassistant/components/switch/manifest.json index b14c8ca48d5..37cdf77172c 100644 --- a/homeassistant/components/switch/manifest.json +++ b/homeassistant/components/switch/manifest.json @@ -3,7 +3,7 @@ "name": "Switch", "documentation": "https://www.home-assistant.io/integrations/switch", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [], "quality_scale": "internal" } diff --git a/homeassistant/components/vacuum/manifest.json b/homeassistant/components/vacuum/manifest.json index 895311ae5b6..a6f7ddb2bda 100644 --- a/homeassistant/components/vacuum/manifest.json +++ b/homeassistant/components/vacuum/manifest.json @@ -3,6 +3,6 @@ "name": "Vacuum", "documentation": "https://www.home-assistant.io/integrations/vacuum", "requirements": [], - "dependencies": ["group"], + "dependencies": [], "codeowners": [] } diff --git a/script/hassfest/dependencies.py b/script/hassfest/dependencies.py index 934400533e1..660e8065966 100644 --- a/script/hassfest/dependencies.py +++ b/script/hassfest/dependencies.py @@ -156,7 +156,7 @@ def calc_allowed_references(integration: Integration) -> Set[str]: """Return a set of allowed references.""" allowed_references = ( ALLOWED_USED_COMPONENTS - | set(integration.manifest["dependencies"]) + | set(integration.manifest.get("dependencies", [])) | set(integration.manifest.get("after_dependencies", [])) ) @@ -250,7 +250,7 @@ def validate(integrations: Dict[str, Integration], config): validate_dependencies(integrations, integration) # check that all referenced dependencies exist - for dep in integration.manifest["dependencies"]: + for dep in integration.manifest.get("dependencies", []): if dep not in integrations: integration.add_error( "dependencies", f"Dependency {dep} does not exist" diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py index 7852953dc92..758279cabf8 100644 --- a/script/hassfest/manifest.py +++ b/script/hassfest/manifest.py @@ -52,8 +52,8 @@ MANIFEST_SCHEMA = vol.Schema( vol.Url(), documentation_url # pylint: disable=no-value-for-parameter ), vol.Optional("quality_scale"): vol.In(SUPPORTED_QUALITY_SCALES), - vol.Required("requirements"): [str], - vol.Required("dependencies"): [str], + vol.Optional("requirements"): [str], + vol.Optional("dependencies"): [str], vol.Optional("after_dependencies"): [str], vol.Required("codeowners"): [str], vol.Optional("logo"): vol.Url(), # pylint: disable=no-value-for-parameter