mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add template cover opening and closing states (#40677)
This commit is contained in:
parent
fe6786aa6a
commit
ee9540e137
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user