Open garage, add closing and opening to state (#55372)

This commit is contained in:
Daniel Hjelseth Høyer 2021-09-01 15:16:10 +02:00 committed by GitHub
parent f8ec85686a
commit 80af2f4279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,21 @@ class OpenGarageCover(CoverEntity):
"""Return if the cover is closed."""
if self._state is None:
return None
return self._state in [STATE_CLOSED, STATE_OPENING]
return self._state == STATE_CLOSED
@property
def is_closing(self):
"""Return if the cover is closing."""
if self._state is None:
return None
return self._state == STATE_CLOSING
@property
def is_opening(self):
"""Return if the cover is opening."""
if self._state is None:
return None
return self._state == STATE_OPENING
async def async_close_cover(self, **kwargs):
"""Close the cover."""