Reset state of template cover on error (#88915)

This commit is contained in:
Erik Montnemery 2023-02-28 18:06:40 +01:00 committed by GitHub
parent ac6bbc2f1c
commit 7bfc7f134c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -233,6 +233,9 @@ class CoverTemplate(TemplateEntity, CoverEntity):
if not self._position_template:
self._position = None
self._is_opening = False
self._is_closing = False
@callback
def _update_position(self, result):
try:

View File

@ -72,7 +72,7 @@ OPEN_CLOSE_COVER_CONFIG = {
(
"cover.test_state",
"dog",
STATE_CLOSING,
STATE_UNKNOWN,
{},
-1,
"Received invalid cover is_on state: dog",