Running list of all state changes

You cannot loop a single attribute or property.
But you can create a history in your template sensor’s attributes. Here are a few examples:

Trigger sensor to determine if someone is either entering or exiting a door

Template sensor with last good value stored in attribute

Is there a way to retain the previous attribute with trigger sensor? - #3 by coolhand

Persistent version of "last-changed" for the UI? - #67 by TheFes

List of 10 last breached motion sensors/doors/windows? - #3 by 123

1 Like