Last_updated on sensor doesn't show latest update

My temperature sensors doesn’t seem to get latest update, e.g “states.sensor.stua_temperature.last_updated” now shows “2018-11-13 13:25:12.249325+00:00”. But in the Telldus interface it was updated a minute ago:

So, what is wrong? Maybe “last_updated” only changes when the temperature actually changes?

What are the attributes when you look at the sensor in the /dev-state tab?

It isn’t shown in /dev-state, probably since it isn’t an attribute. I can see it in /dev-template using {{ states.sensor.stua_temperature.last_updated }} though.

last_updated will show you the last time a object was updated. Unless you restart/shutdown&bootup. When you restart/shutdown&bootup, all objects in home assistant will have the last_updated time changed to when the system was started (because the system updated the states on startup). Same with last_changed.

But shouldn’t last_updated be updated every time my temperature sensor sends a new value to telldus/HA?

Yes, and it will. I think you are not realizing that the timestamp for last updated isn’t in local time. It’s in UTC. That’s what the +00.00 is showing you.


But 13:25 + 1 hour still isn’t 14:37…?

not sure where you are getting 14:37. I don’t recognize that interface so I’m guessing it’s the devices interface. You need to look at the time in home assistant. It’s last updated is based on when home assistant gets an update from the device. The device may have updated in it’s own software but that doesn’t mean it published a change outbound.

If you have MQTT sensor: if measured data is same as previous value, then HA will not update, if you want to update every x minute, you must add force_update option.

1 Like