View for 'stale entities'?

Does anyone know if its possible to have any kind of view in HA that will display ‘stale entities’ ? - by that I mean entities that have not updated their value in x hrs/days/weeks ?

I find that I’m having lots of automations based on entity values, so I rarely look at individual entities on my dashboard, as I have no need.
It’s only when I notice some automation has stopped working that upon investigation it’s because some device battery is flat / has dropped off the network etc… so it’s stuck on some old value, or unavailable

It would be really nice if I could simply monitor that devices are online and updated their value within a given time period - if not I could automatically ping a notification to alert me that a device is down.

I know this is old, but I found this while looking for the same thing and ultimately was able to implement it using @thomasloven’s excellent Auto-Entities card.

Here are two card definitions that I have so far (might add more later), one for Z-Wave door sensors using the last-updated timestamp of the node status entity, and one for Zigbee environmental sensors using the last-changed timestamp of the temperature entity:

      - type: custom:auto-entities
        card:
          type: entities
          title: Stale Door Sensors
          show_header_toggle: false
          state_color: true
        filter:
          include:
            - entity_id: sensor.*_door_node_status
              last_updated: '>360'
              options:
                secondary_info: last-updated
        sort:
          method: state
          numeric: true
        show_empty: false
      - type: custom:auto-entities
        card:
          type: entities
          title: Stale Environmental Sensors
          show_header_toggle: false
          state_color: true
        filter:
          include:
            - entity_id: sensor.aqara_env_*_temperature
              last_changed: '>360'
              options:
                secondary_info: last-changed
        sort:
          method: name
          numeric: true
        show_empty: false

I originally used the last-updated value as the filter for the Zigbee environmental sensors as well, but then discovered that it changed when I simply renamed the entity, which surprised me. Maybe there’s a cleaner way to do it, but the above works very well.

1 Like