From e8bc2758c9d379ee6caed0402ef2e914393ab765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20C=C3=A1ceres?= Date: Tue, 12 Nov 2024 00:11:29 +0100 Subject: [PATCH 1/2] fix async_get_last_action_log_entry in coordinator.py --- custom_components/hass_nuki_bt/coordinator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hass_nuki_bt/coordinator.py b/custom_components/hass_nuki_bt/coordinator.py index 30231cc..75a15af 100644 --- a/custom_components/hass_nuki_bt/coordinator.py +++ b/custom_components/hass_nuki_bt/coordinator.py @@ -113,7 +113,7 @@ async def _async_update( if service_info: self.device.set_ble_device(service_info.device) await self.device.update_state() - await self._async_get_last_action_log_entry() + await self.async_get_last_action_log_entry() self.async_update_nuki_listeners() @callback @@ -140,7 +140,7 @@ async def async_wait_ready(self) -> bool: return True return False - async def _async_get_last_action_log_entry(self): + async def async_get_last_action_log_entry(self): if self._security_pin: # get the latest log entry # todo: check if Nuki logging is enabled From b94937f2fa3f23fcb04325b31b10861a83daaa28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20C=C3=A1ceres?= Date: Tue, 12 Nov 2024 00:25:21 +0100 Subject: [PATCH 2/2] add docstring --- custom_components/hass_nuki_bt/coordinator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/hass_nuki_bt/coordinator.py b/custom_components/hass_nuki_bt/coordinator.py index 75a15af..e75ad83 100644 --- a/custom_components/hass_nuki_bt/coordinator.py +++ b/custom_components/hass_nuki_bt/coordinator.py @@ -141,6 +141,7 @@ async def async_wait_ready(self) -> bool: return False async def async_get_last_action_log_entry(self): + """Get the last action log entry.""" if self._security_pin: # get the latest log entry # todo: check if Nuki logging is enabled