mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
parent
cfd8695aaa
commit
2bf51a033b
@ -188,9 +188,10 @@ class VerisureDoorlock(CoordinatorEntity[VerisureDataUpdateCoordinator], LockEnt
|
|||||||
def disable_autolock(self) -> None:
|
def disable_autolock(self) -> None:
|
||||||
"""Disable autolock on a doorlock."""
|
"""Disable autolock on a doorlock."""
|
||||||
try:
|
try:
|
||||||
self.coordinator.verisure.set_lock_config(
|
command = self.coordinator.verisure.set_autolock_enabled(
|
||||||
self.serial_number, auto_lock_enabled=False
|
self.serial_number, auto_lock_enabled=False
|
||||||
)
|
)
|
||||||
|
self.coordinator.verisure.request(command)
|
||||||
LOGGER.debug("Disabling autolock on %s", self.serial_number)
|
LOGGER.debug("Disabling autolock on %s", self.serial_number)
|
||||||
except VerisureError as ex:
|
except VerisureError as ex:
|
||||||
LOGGER.error("Could not disable autolock, %s", ex)
|
LOGGER.error("Could not disable autolock, %s", ex)
|
||||||
@ -198,9 +199,10 @@ class VerisureDoorlock(CoordinatorEntity[VerisureDataUpdateCoordinator], LockEnt
|
|||||||
def enable_autolock(self) -> None:
|
def enable_autolock(self) -> None:
|
||||||
"""Enable autolock on a doorlock."""
|
"""Enable autolock on a doorlock."""
|
||||||
try:
|
try:
|
||||||
self.coordinator.verisure.set_lock_config(
|
command = self.coordinator.verisure.set_autolock_enabled(
|
||||||
self.serial_number, auto_lock_enabled=True
|
self.serial_number, auto_lock_enabled=True
|
||||||
)
|
)
|
||||||
|
self.coordinator.verisure.request(command)
|
||||||
LOGGER.debug("Enabling autolock on %s", self.serial_number)
|
LOGGER.debug("Enabling autolock on %s", self.serial_number)
|
||||||
except VerisureError as ex:
|
except VerisureError as ex:
|
||||||
LOGGER.error("Could not enable autolock, %s", ex)
|
LOGGER.error("Could not enable autolock, %s", ex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user