|
|
@@ -249,16 +249,19 @@ class RoomCalCoordinator(DataUpdateCoordinator[CoordinatorData]):
|
|
|
async def _async_push_lock_codes(self, code: str) -> None:
|
|
|
slot = self.entry.options.get(CONF_ZWAVE_SLOT)
|
|
|
lock_entity_ids = self._zlock_entity_ids()
|
|
|
+ _LOGGER.debug("push_lock_codes: slot=%s locks=%s", slot, lock_entity_ids)
|
|
|
if not lock_entity_ids or slot is None:
|
|
|
return
|
|
|
slot = int(slot)
|
|
|
for entity_id in lock_entity_ids:
|
|
|
try:
|
|
|
+ _LOGGER.debug("zlock set_code: %s slot %s", entity_id, slot)
|
|
|
await self.hass.services.async_call(
|
|
|
"zlock_slots", "set_code",
|
|
|
{"lock_entity_id": entity_id, "slot": slot, "code": code},
|
|
|
blocking=True,
|
|
|
)
|
|
|
+ _LOGGER.debug("zlock set_slot_enabled True: %s slot %s", entity_id, slot)
|
|
|
await self.hass.services.async_call(
|
|
|
"zlock_slots", "set_slot_enabled",
|
|
|
{"lock_entity_id": entity_id, "slot": slot, "enabled": True},
|
|
|
@@ -270,11 +273,13 @@ class RoomCalCoordinator(DataUpdateCoordinator[CoordinatorData]):
|
|
|
async def _async_clear_lock_codes(self) -> None:
|
|
|
slot = self.entry.options.get(CONF_ZWAVE_SLOT)
|
|
|
lock_entity_ids = self._zlock_entity_ids()
|
|
|
+ _LOGGER.debug("clear_lock_codes: slot=%s locks=%s", slot, lock_entity_ids)
|
|
|
if not lock_entity_ids or slot is None:
|
|
|
return
|
|
|
slot = int(slot)
|
|
|
for entity_id in lock_entity_ids:
|
|
|
try:
|
|
|
+ _LOGGER.debug("zlock set_slot_enabled False: %s slot %s", entity_id, slot)
|
|
|
await self.hass.services.async_call(
|
|
|
"zlock_slots", "set_slot_enabled",
|
|
|
{"lock_entity_id": entity_id, "slot": slot, "enabled": False},
|