I wanted to create some sensor templates that respond to changes of other sensors (so that I don’t generate them more frequently than source data change, however I found platform: state for sensors surprisingly useless.
The core issue is that when I define entity ID to track state of, when state does actually change, there is no access (or maybe I don’t know how to get there, wasn’t able to find that in documentation) to either from or to of the change. It would be really helpful to get access to from.state, from.last_updated, from.last_changed, etc. and for the to.* as well.
Without this I’m currently storing values in attributes, which is awkward and redundant.
Hm… I did actually look there and something didn’t work, but now I tried it and succeeded. Thanks!
Would have been great to have more links back and forth between all those pages. Like when I see the trigger, the next thing I want to know is that data it contains.
I would expect the value of last_updated to be the previous time when it was updated (not the current time while it’s being updated). So I agree it should be corrected.