Add last update

This commit is contained in:
Antonio J. Delgado 2025-07-26 12:36:28 +03:00
parent 1fceb4dc61
commit 9b619ce8fc

View file

@ -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: