Add base schema for triggers (#51727)

* Add base schema for triggers

* Tweak

* Make TRIGGER_BASE_SCHEMA a voluptuous schema

* Make state trigger BASE_SCHEMA a voluptuous schema
This commit is contained in:
Erik Montnemery 2021-06-11 09:51:12 +02:00 committed by GitHub
parent 9e378d51af
commit 49bec86dae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 33 additions and 27 deletions

View file

@ -15,7 +15,7 @@ from homeassistant.helpers.event import async_track_sunrise, async_track_sunset
# mypy: allow-untyped-defs, no-check-untyped-defs
TRIGGER_SCHEMA = vol.Schema(
TRIGGER_SCHEMA = cv.TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_PLATFORM): "sun",
vol.Required(CONF_EVENT): cv.sun_event,