Improve typing in fans and locks (#73901)

This commit is contained in:
epenet 2022-06-23 16:34:40 +02:00 committed by GitHub
parent ff7d840a6c
commit 3c82c718cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 27 additions and 26 deletions

View file

@ -189,12 +189,12 @@ class MqttLock(MqttEntity, LockEntity):
return self._state
@property
def assumed_state(self):
def assumed_state(self) -> bool:
"""Return true if we do optimistic updates."""
return self._optimistic
@property
def supported_features(self):
def supported_features(self) -> int:
"""Flag supported features."""
return LockEntityFeature.OPEN if CONF_PAYLOAD_OPEN in self._config else 0