Add last update
This commit is contained in:
parent
1fceb4dc61
commit
9b619ce8fc
1 changed files with 6 additions and 0 deletions
|
@ -119,6 +119,12 @@ class XploraHa:
|
||||||
for watch in self.xplora.watchs:
|
for watch in self.xplora.watchs:
|
||||||
self._debug(watch['ward'])
|
self._debug(watch['ward'])
|
||||||
base_sensor_entity = f"sensor.xplora_watch_{watch['ward']['name']}_"
|
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:
|
for watch_state in WATCH_STATES:
|
||||||
function = getattr(self.xplora, watch_state['function'])
|
function = getattr(self.xplora, watch_state['function'])
|
||||||
if 'params' in watch_state:
|
if 'params' in watch_state:
|
||||||
|
|
Loading…
Reference in a new issue