Add top-level target support to trigger schema (#148894)

This commit is contained in:
Abílio Costa 2025-07-18 14:32:16 +01:00 committed by GitHub
parent 1743766d17
commit 29d0d6cd43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,9 @@ FIELD_SCHEMA = vol.Schema(
TRIGGER_SCHEMA = vol.Any( TRIGGER_SCHEMA = vol.Any(
vol.Schema( vol.Schema(
{ {
vol.Optional("target"): vol.Any(
selector.TargetSelector.CONFIG_SCHEMA, None
),
vol.Optional("fields"): vol.Schema({str: FIELD_SCHEMA}), vol.Optional("fields"): vol.Schema({str: FIELD_SCHEMA}),
} }
), ),