Add template cover opening and closing states (#40677)

This commit is contained in:
Richard van Duijn 2020-09-29 16:04:33 +02:00 committed by GitHub
parent fe6786aa6a
commit ee9540e137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,9 @@ from homeassistant.const import (
CONF_UNIQUE_ID,
CONF_VALUE_TEMPLATE,
STATE_CLOSED,
STATE_CLOSING,
STATE_OPEN,
STATE_OPENING,
)
from homeassistant.core import callback
from homeassistant.exceptions import TemplateError
@ -42,7 +44,14 @@ from .const import CONF_AVAILABILITY_TEMPLATE, DOMAIN, PLATFORMS
from .template_entity import TemplateEntity
_LOGGER = logging.getLogger(__name__)
_VALID_STATES = [STATE_OPEN, STATE_CLOSED, "true", "false"]
_VALID_STATES = [
STATE_OPEN,
STATE_OPENING,
STATE_CLOSED,
STATE_CLOSING,
"true",
"false",
]
CONF_COVERS = "covers"