Find battery powered devices with no updates since 24 h

I am using the blueprint to find devices with battery below 5%. However I had devices that never reported such low states and just stopped working. Because of this I want to add a script that finds all battery powered devices that didn’t have any communication / update since 24h. The devices are Z-Wave.

How can I do this?

I too would like to learn how to do this but I’ve found over time 25% seems to be the sweet spot where they can go from communicating and working fine to none responsive or 0%. Following in case somebody else has the answer.

Anyone having an idea?

It is not automated, but it could be a start:

{% if now().strftime("%s") |float - states.sensor.motion_device_battery.last_updated.strftime("%s")|float > 60*60*12  %}
  {{ "Device is lost..." }}
{%- else -%}
  {{ "ok" }}
{%- endif %}

Then trigger a notification.