mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Allow supported brands in manifests (#67015)
This commit is contained in:
parent
010e6cb4ba
commit
7c7a86242e
@ -248,12 +248,14 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Optional("loggers"): [str],
|
||||
vol.Optional("disabled"): str,
|
||||
vol.Optional("iot_class"): vol.In(SUPPORTED_IOT_CLASSES),
|
||||
vol.Optional("supported_brands"): vol.Schema({str: str}),
|
||||
}
|
||||
)
|
||||
|
||||
CUSTOM_INTEGRATION_MANIFEST_SCHEMA = MANIFEST_SCHEMA.extend(
|
||||
{
|
||||
vol.Optional("version"): vol.All(str, verify_version),
|
||||
vol.Remove("supported_brands"): dict,
|
||||
}
|
||||
)
|
||||
|
||||
@ -307,6 +309,13 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
|
||||
):
|
||||
integration.add_error("manifest", "Domain is missing an IoT Class")
|
||||
|
||||
for domain, _name in integration.manifest.get("supported_brands", {}).items():
|
||||
if (core_components_dir / domain).exists():
|
||||
integration.add_warning(
|
||||
"manifest",
|
||||
f"Supported brand domain {domain} collides with built-in core integration",
|
||||
)
|
||||
|
||||
if not integration.core:
|
||||
validate_version(integration)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user