I would like to have an automation fire when the state of an entity is updated even if the state does not change. Basically, I want the automation to fire even if my entity is going from on to on.
The entity which I am trying to use to trigger the automation is a cover. If I press the up button once and again a little later, I want both events to trigger the automation. However, currently only the first one triggers the automation. Furthermore, if I press twice on the up button, only the first one changes the cover’s {{states.cover.living_room_shutters.last_changed}}
.
What can I do?
Have you tried using a template trigger instead of a state trigger?
That might not work, though. The tricky thing with template triggers are that they look for changes to an entity in the equation. You might need to create a template binary sensor that basically says “run this automation”, then use it’s entity in your state trigger.
Here’s a recent post where I figured out how to set up a template sensor and use some time calculations. You’ll want a date_time entity involved in the template so that it keeps getting updated.