This commit is contained in:
Home Assistant Version Control
2026-07-24 15:19:02 +00:00
parent 8abf4efaec
commit 2d21a40fd6
48 changed files with 4181 additions and 232 deletions
+4 -4
View File
@@ -38,17 +38,17 @@ class MideaLock(MideaEntity, LockEntity):
@property
def is_locked(self) -> bool:
"""Return true if state is locked."""
"""Whether the lock is locked."""
return cast("bool", self._device.get_attribute(self._entity_key))
def lock(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
def lock(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
"""Lock the lock."""
self._device.set_attribute(attr=self._entity_key, value=True)
def unlock(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
def unlock(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
"""Unlock the lock."""
self._device.set_attribute(attr=self._entity_key, value=False)
def open(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
def open(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
"""Open the lock."""
self.unlock()