diff --git a/script/hassfest/conditions.py b/script/hassfest/conditions.py index b9e9e7b82a42c..ecb7ceca7f24d 100644 --- a/script/hassfest/conditions.py +++ b/script/hassfest/conditions.py @@ -38,6 +38,7 @@ def exists(value: Any) -> Any: CONDITION_SCHEMA = vol.Any( vol.Schema( { + vol.Optional("target"): selector.TargetSelector.CONFIG_SCHEMA, vol.Optional("fields"): vol.Schema({str: FIELD_SCHEMA}), } ), diff --git a/tests/hassfest/test_conditions.py b/tests/hassfest/test_conditions.py index 09046c0007f87..860ef54f951c9 100644 --- a/tests/hassfest/test_conditions.py +++ b/tests/hassfest/test_conditions.py @@ -21,6 +21,9 @@ "valid": { CONDITION_DESCRIPTION_FILENAME: """ _: + target: + entity: + domain: light fields: after: example: sunrise