From ee9540e13700c8ec572a222f183e9dd750a75547 Mon Sep 17 00:00:00 2001 From: Richard van Duijn Date: Tue, 29 Sep 2020 16:04:33 +0200 Subject: [PATCH] Add template cover opening and closing states (#40677) --- homeassistant/components/template/cover.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/template/cover.py b/homeassistant/components/template/cover.py index dc9e5ead1d0..fe8b6568c1e 100644 --- a/homeassistant/components/template/cover.py +++ b/homeassistant/components/template/cover.py @@ -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"