I would expect that states.sensor.schlage_link_mini_keypad_rfid_access_control_29_9.last_updated
Would give me a timestamp whenever there is an explicit (so no just polling but due to a user action) update received from the Zwave network from this sensor. Even if the sensor state/value (let’s say 255) is the same as it already was.
Is this expected behavior? Is there another way to catch the latest update (even if it is the same state/value)?
if you make an templatesensor with that as template it will normally update every time the sensor is updated.
but only if you give explicitly identify the entityID which must cause the update.
but my experience is that last_updated and last_changed very often are just the same.
i think that in most platforms there is a check if a value is the same and then doesnt change/update the value (for performance reason?)
but then they forget to update the updated time.
Would expected behavior of state.last_updated not be the actual last update timestamp -independent- if the value was identical of the previous value (last_changed would capture this)?
state.last_updated Time the state was written to the state machine. Note that writing the exact same state including attributes will not result in this field being updated. Example: 14:10:03 13-03-2016.
I think it should be changed to:
state.last_updated Time the state was written to the state machine. Note that writing the exact same state WILL result in this field being updated. Example: 14:10:03 13-03-2016.
The last_updated attribute in the state is the only way to know if the state is reliable or not. For example, I don’t want to use the temperature if it’s last updated 2 days ago. Sensors can go down we have to deal with the failures. Could it be changed?