Don't override methods marked as final (#57477)

This commit is contained in:
Marc Mueller 2021-10-11 15:24:06 +02:00 committed by GitHub
parent a827521138
commit 748d915909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 38 deletions

View file

@ -73,7 +73,7 @@ class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
return SUPPORT_OPEN | SUPPORT_CLOSE
@property
def state(self):
def _state(self):
"""Return the current state of the garage door."""
value = self.service.value(CharacteristicsTypes.DOOR_STATE_CURRENT)
return CURRENT_GARAGE_STATE_MAP[value]
@ -81,17 +81,17 @@ class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
@property
def is_closed(self):
"""Return true if cover is closed, else False."""
return self.state == STATE_CLOSED
return self._state == STATE_CLOSED
@property
def is_closing(self):
"""Return if the cover is closing or not."""
return self.state == STATE_CLOSING
return self._state == STATE_CLOSING
@property
def is_opening(self):
"""Return if the cover is opening or not."""
return self.state == STATE_OPENING
return self._state == STATE_OPENING
async def async_open_cover(self, **kwargs):
"""Send open command."""