A lot of us are using last_changed as a secondary info for many cards.
however, when a state changes to “unknown” or “unavailable” it reset the timer.
I suggest adding another attribute called, last_known_change that shows the last time an entity actually changed states.
It is a small change but will be very helpful for a lot of people in a lot of dashboards.
Agreed! “Last time HA was restarted” is not the info I’m looking for
FWIW, this was already WTH’d in 2022:
It’s been WTH’d every year that it’s ran! This years was also fairly close to the top but seemingly nothing planned from it sadly.
I created DB query that adds “last_real_change” to entities. I’m using influxDB for history records and I inject this attribute to entities using NodeRed.
It’s heavy to run, and I wish it was added to the official version.
It should be very easy, just adding another column to the database and updating it on every state change, except for “unknown” and “unavailable”.
Oh… I guess this post was a duplicate of that one then (8 votes isn’t going to get it near the top)
Really unfortunate – I get there are workarounds, but those aren’t useable in every card – for instance, I’d like to use it in my Heading badges…
Have you seen this solution, Hananv? It might be more lightweight than yours…
Yeah I marked this as the solution after years of waiting around in the end. Shouldn’t have to but I’m glad it works and it’s been stable for years for me now.
I kind of like how mine is set up, it adds “real_last_changed” as an attribute to every entity.
In most cards, it is really easy to point to this attribute instead of last_changed.
But it’s similar in concept.