1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Allow core integrations to describe their conditions (#147529)

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
This commit is contained in:
Erik Montnemery
2025-07-04 16:03:42 +02:00
committed by GitHub
parent e47bdc06a0
commit 510fd09163
11 changed files with 907 additions and 6 deletions

View File

@@ -120,6 +120,16 @@ CUSTOM_INTEGRATION_SERVICE_ICONS_SCHEMA = cv.schema_with_slug_keys(
)
CONDITION_ICONS_SCHEMA = cv.schema_with_slug_keys(
vol.Schema(
{
vol.Optional("condition"): icon_value_validator,
}
),
slug_validator=translation_key_validator,
)
TRIGGER_ICONS_SCHEMA = cv.schema_with_slug_keys(
vol.Schema(
{
@@ -166,6 +176,7 @@ def icon_schema(
schema = vol.Schema(
{
vol.Optional("conditions"): CONDITION_ICONS_SCHEMA,
vol.Optional("config"): DATA_ENTRY_ICONS_SCHEMA,
vol.Optional("issues"): vol.Schema(
{str: {"fix_flow": DATA_ENTRY_ICONS_SCHEMA}}