Skip to content

Commit

Permalink
fix: allow to work with HA 2021.7
Browse files Browse the repository at this point in the history
Rename TRIGGER_BASE_SCHEMA to DEVICE_TRIGGER_BASE_SCHEMA.
It was done in core home-assistant/core@8f398eb
and we should do same.
  • Loading branch information
IATkachenko committed Jul 7, 2021
1 parent 9787b85 commit 0171caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/sleep_as_android/device_trigger.py
@@ -1,6 +1,6 @@
import logging
import voluptuous as vol
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA
from homeassistant.const import (CONF_ENTITY_ID, CONF_TYPE, CONF_PLATFORM, CONF_DOMAIN, CONF_DEVICE_ID, )
from homeassistant.components.homeassistant.triggers import event as event_trigger
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -38,7 +38,7 @@
"sound_event_laugh"
]

TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend(
TRIGGER_SCHEMA = DEVICE_TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_TYPE): vol.In(TRIGGERS),
}
Expand Down

0 comments on commit 0171caf

Please sign in to comment.