mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 05:06:13 +01:00
Ensure all base component dependencies are added (#157428)
This commit is contained in:
@@ -350,6 +350,24 @@ def gather_modules() -> dict[str, list[str]] | None:
|
||||
return reqs
|
||||
|
||||
|
||||
def gather_entity_platform_requirements() -> set[str]:
|
||||
"""Gather all of the requirements from manifests for entity platforms."""
|
||||
config = _get_hassfest_config()
|
||||
integrations = Integration.load_dir(config.core_integrations_path, config)
|
||||
reqs = set()
|
||||
for domain in sorted(integrations):
|
||||
integration = integrations[domain]
|
||||
|
||||
if integration.disabled:
|
||||
continue
|
||||
|
||||
if integration.integration_type != "entity":
|
||||
continue
|
||||
|
||||
reqs.update(gather_recursive_requirements(integration.domain))
|
||||
return reqs
|
||||
|
||||
|
||||
def gather_requirements_from_manifests(
|
||||
errors: list[str], reqs: dict[str, list[str]]
|
||||
) -> None:
|
||||
@@ -432,7 +450,12 @@ def requirements_output() -> str:
|
||||
"\n",
|
||||
"# Home Assistant Core\n",
|
||||
]
|
||||
output.append("\n".join(core_requirements()))
|
||||
|
||||
requirements = set()
|
||||
requirements.update(core_requirements())
|
||||
requirements.update(gather_entity_platform_requirements())
|
||||
|
||||
output.append("\n".join(sorted(requirements, key=lambda key: key.lower())))
|
||||
output.append("\n")
|
||||
|
||||
return "".join(output)
|
||||
|
||||
Reference in New Issue
Block a user