Compare commits

...

1 Commits

Author SHA1 Message Date
Paulus Schoutsen
6c2fc12b6a Validate Platform constant up to date 2025-09-12 11:04:25 -04:00
3 changed files with 12 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ LOG_NAME = "Tag"
TAG = "tag"
PARALLEL_UPDATES = 0
DISCOVERY_SCHEMA = MQTT_BASE_SCHEMA.extend(
{
vol.Optional(CONF_DEVICE): MQTT_ENTITY_DEVICE_INFO_SCHEMA,

View File

@@ -75,6 +75,7 @@ class Platform(StrEnum):
SWITCH = "switch"
TEXT = "text"
TIME = "time"
TAG = "tag"
TODO = "todo"
TTS = "tts"
UPDATE = "update"

View File

@@ -342,6 +342,15 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
"manifest", "Domain collides with built-in core integration"
)
if (
integration.manifest.get("integration_type") == "entity"
and integration.domain not in Platform
):
integration.add_error(
"manifest",
"Integration should be added to Platform constant in homeassistant/const.py",
)
if domain in NO_IOT_CLASS and "iot_class" in integration.manifest:
integration.add_error("manifest", "Domain should not have an IoT Class")