Add verisure lock method attribute (#70375)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>pull/70473/head^2
parent
a875789987
commit
1ef060700a
|
@ -99,6 +99,11 @@ class VerisureDoorlock(CoordinatorEntity[VerisureDataUpdateCoordinator], LockEnt
|
|||
"""Last change triggered by."""
|
||||
return self.coordinator.data["locks"][self.serial_number].get("userString")
|
||||
|
||||
@property
|
||||
def changed_method(self) -> str:
|
||||
"""Last change method."""
|
||||
return self.coordinator.data["locks"][self.serial_number]["method"]
|
||||
|
||||
@property
|
||||
def code_format(self) -> str:
|
||||
"""Return the required six digit code."""
|
||||
|
@ -112,6 +117,11 @@ class VerisureDoorlock(CoordinatorEntity[VerisureDataUpdateCoordinator], LockEnt
|
|||
== "LOCKED"
|
||||
)
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {"method": self.changed_method}
|
||||
|
||||
async def async_unlock(self, **kwargs) -> None:
|
||||
"""Send unlock command."""
|
||||
code = kwargs.get(
|
||||
|
|
Loading…
Reference in New Issue