Had a Zwave battery go from 100% to dead in one of my door sensors. The only way I noticed was that the automation for the light turning on when the door opened wasn’t working anymore. When I looked at the battery level via HA, it showed 100%, but that it hadn’t reported in over three days. My other sensors report within 24 hours, whether the door is opened or not. Is there a way I can pull this “last report” value to use in a notification automation?
If you go to “Developer tools”, and then “States”, you can see all the attributes of each entity. My multisensor has a “lastUpdate” value, which looks like it’s in Unix time, so you might be able to use that if yours is the same…
1 Like
Oh, I realise that that might have come across like “lol, use search”, but I didn’t mean that way haha, I’ve just been scrolling the “Latest” topics list and realised they were related
1 Like
Thanks for the help. This is what I came up with.
- alias: 'Battery Basement Bedroom Closet Door Sensor Report'
trigger:
platform: time
at: '11:30:00'
condition:
condition: template
value_template: '{{ (now() - states.sensor.basement_bedroom_closet_door_sensor_battery_level.last_changed ).seconds > 86400 }}'
action:
service: notify.pushover
data:
message: 'Basement Bedroom Closet Door Sensor last report greater than 1 day.'