Add mandatory last_seen for entities (and devices)

Detecting dead devices (and entities) is a real pain.

For what I see, attributes last_updated and last_changed aren’t reliable.

When they’re available, they’re updated by HA restart.

Zigbee2mqtt provides a last_seen if in conf:

  • availability: true
  • last_seen: not disabled

ZwaveJS@mqtt seems to provide a strange time attribute = epoc / 100 ?

rfxtrx: No time attribute?

Philips Hue: No alive status without status change

Add mandatory last_seen

So what are you suggesting? Deleting from the source code every enitity that doesn’t comply?

1 Like

No, I say at least an entity last_seen should be updated when there’s any change/update/whatever, but not restart.
If the integration supports a more precise last_seen, then use it.
In time I hope more integrations will provide it.
It would be nice also to have a last_seen for devices, with the latest timestamp from any of its entities, if it’s not too heavy for the database.