Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions custom_components/keymaster/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from homeassistant.helpers.event import async_call_later, async_track_state_change_event
from homeassistant.helpers.storage import Store
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from homeassistant.util import slugify

from .const import (
ATTR_ACTION_CODE,
Expand Down Expand Up @@ -60,9 +59,7 @@
Throttle,
call_hass_service,
delete_code_slot_entities,
dismiss_persistent_notification,
send_manual_notification,
send_persistent_notification,
)
from .lock import (
KeymasterCodeSlot,
Expand Down Expand Up @@ -834,16 +831,6 @@ async def _door_closed(self, kmlock: KeymasterLock) -> None:

if kmlock.retry_lock and kmlock.pending_retry_lock:
await self._lock_lock(kmlock=kmlock)
await dismiss_persistent_notification(
hass=self.hass,
notification_id=f"{slugify(kmlock.lock_name).lower()}_autolock_door_open",
)
await send_persistent_notification(
hass=self.hass,
title=f"{kmlock.lock_name} is closed",
message=f"The {kmlock.lock_name} sensor indicates the door has been closed, re-attempting to lock.",
notification_id=f"{slugify(kmlock.lock_name).lower()}_autolock_door_closed",
)

if kmlock.door_notifications:
await send_manual_notification(
Expand Down Expand Up @@ -887,12 +874,6 @@ async def _timer_triggered(self, kmlock: KeymasterLock, _: dt) -> None:
_LOGGER.debug("[timer_triggered] %s", kmlock.lock_name)
if kmlock.retry_lock and kmlock.door_state == STATE_OPEN:
kmlock.pending_retry_lock = True
await send_persistent_notification(
hass=self.hass,
title=f"Unable to lock {kmlock.lock_name}",
message=f"Unable to lock {kmlock.lock_name} as the sensor indicates the door is currently opened. The operation will be automatically retried when the door is closed.",
notification_id=f"{slugify(kmlock.lock_name).lower()}_autolock_door_open",
)
else:
await self._lock_lock(kmlock=kmlock)

Expand Down
Loading