From 9b619ce8fc6a6d985a5cc9b47a835bc9ad4c70fc Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sat, 26 Jul 2025 12:36:28 +0300 Subject: [PATCH] Add last update --- xplora_ha/xplora_ha.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xplora_ha/xplora_ha.py b/xplora_ha/xplora_ha.py index a6c20d4..2b716ba 100755 --- a/xplora_ha/xplora_ha.py +++ b/xplora_ha/xplora_ha.py @@ -119,6 +119,12 @@ class XploraHa: for watch in self.xplora.watchs: self._debug(watch['ward']) base_sensor_entity = f"sensor.xplora_watch_{watch['ward']['name']}_" + self._publish_ha_state( + f"{base_sensor_entity}last_update", + { + "state": time.time() + } + ) for watch_state in WATCH_STATES: function = getattr(self.xplora, watch_state['function']) if 'params' in watch_state: