WTH Last Changed & Last Updated not showing in Companion App?

The Last Changed & Last Updated used to be as attributes, visible if you clicked on the sensor , but now they are hidden. In the browser you can see it as a tool tip, but this is not visible in the mobile app!!. This information is important , you don’t know sensor did not change status because it has the same value , or just the sensor did not receive any updates, these are 2 very different reasons.

They have never been exposed as attributes, they’ve only been on-hover displays. You’re thinking of last_triggered for automations and scripts. They might have been displayed in an info panel, however they’ve never been treated like attributes.

It would be nice to see this info on mobile.

Maybe not exposed as attributes per say, but in the older days , they were showing in the attributes section! After they were moved to on-hover I do remember this, I am not confusing it with last triggered for sure.
Still the issue here is this info is important , and it should be visible in the mobile as well! I am not a fan of hiding it as a tooltip but that’s another issue. Now thinking about it, maybe there could be like a freshness indicator, if last updated is less then a few minutes, info is fresh, if it did not updated for 1h, probably stale info and sensor state should not be trusted…

I thought along these lines in this WTH too…

You can see them in Developer Tools > States

Dev Tooolls → States → Set State and then find the entity? Cumbersome, the point was for easy access…

Adding another state is a big behavior change, will break all existing automatons…but glad we had similar thoughts

Actually thinking more about it, why not add the information to the attributes? As it was displayed before? This is an important attribute of the sensor, when was it last changed and when was it updated?
Based on this a gui could even implement the stale functionality based on these attributes, show different icon maybe based on these…
So why not add it as attributes for all the sensors? It would not break anything, just extra information…
Max add it optional for whoever wants it… For me it’s esential

After some digging , it is available as property, not as an attribute, and can be accessed…

But I don’t want to create custom gui just to display these, I would like an option to display it for every sensor once I click on it…even on the mobile. Maybe have an option somewhere to display last updated in atributes section? I guess I understand why they removed it, maybe was confusing people as it’s not an attribute, but I still want to see this information easily once I click on the sensor…

That’s why the state object needs another field last_seen, since last_updated doesn’t reflect the last contact.
Monitoring becomes more important the more sensors you have.

I think last_updated is the same as last_seen. Maybe you are confusing it with last_changed?


Time the state was written to the state machine in UTC time. Note that writing the exact same state including attributes will not result in this field being updated.

and last_changed is even “worse”.

Wow , I did not know this!! I guess it’s related to database writing…they will update it , when soemthing is changed…Then yeah there should a 3rd timestamp, last_seen or similar…guess different issue than this wth

Sorry to raise an old thread, but for about the last 6 months some of my template sensors are no longer showing last updated. This is the yaml I used to have:

- platform: template
      friendly_name: "School meds last updated"
      value_template: >-
          {% set s = (now() - states.sensor.lora_school_meds.last_changed).total_seconds() | round(0) %}
           {{ '%02d:%02d' % ((s/3600)|int, (s%3600)/60) }}
      unit_of_measurement: "Hours"
      unique_id: school_sensor_last_updated

any hints?

Many thanks