Trigger automation when any referenced entity changes #439
Replies: 4 comments 4 replies
-
|
My solution to this problem is to trigger on:
No general condition Actions have the condition:
This ensures that:
|
Beta Was this translation helpful? Give feedback.
-
|
I confirm. The Solutions don't understand the problem (i think). Back to the simple example: This Automation is once (!!!) fired: In the morning at 8am. If the temperature is raising above 20° C at 8:01, there will be no "Garden watering" started. Even if the temperature is raising above 30° Celsius after 8:00:02 in the morning. I would like something like "Check Trigger every hh:mm:ss". This problem exists on any automations with conditions: Because the Automation is only fired once after the trigger becomes true, and maybe the automation is stopped because of an condition is false, it will not be fired again after the conditions also becomes thru. There is a help at the forum starting with "a lot of people wondering why their automation is not starting". |
Beta Was this translation helpful? Give feedback.
-
|
Came here to ask for this same thing. I have several automations (and counting) that trigger only when several states align, but setting them up is a pain. For example, automatically turning off the bathroom fan when the humidity is low and the room is unoccupied requires specifying both of those states twice: once in the triggers so it checks every time any relevant state changes, and again in the "And if" to make it only happen when both values align. It would be much more convenient (and concise) to instead just write out the condition I want to check for (both aligning) and have the system figure out what the triggers should be automatically. Basically I want a way to combine the "When" and "And if" blocks into one "If" condition that auto-refreshes every time an input changes. |
Beta Was this translation helpful? Give feedback.
-
|
Same topic: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature
I would like a new trigger or automation option which means "When any entity referenced in Conditions or Actions changes"
Use cases
Consider the simple situation of having a light on between sun down and sun up. The intuitive approach would be to create one automation that triggers on sun down, and another on sun up. More advanced users might combine these into one automation, with triggers for both sun states and a choose block that switches on trigger ID.
But what if the trigger was missed somehow, say by HA restarting at that time? How can you set the light to the state it should be at times other than when the sun state changes?
The solution is not to switch based on trigger ID but the current state of the sun entity: "If sun is down turn light on else turn light off". Now you can add a simple "When sun changes" trigger, an HA restart trigger, time pattern, or whatever else might necessitate setting the light to the "correct" state at that time. Much better!
The trouble is, when these automations grow it becomes a chore to ensure there is a trigger for every state referenced in Conditions or Actions to ensure it runs when they change. A new trigger which was simply "any referenced entity changes" would make these so much more elegant.
Thanks for coming to my TED talk 😄
Current workarounds
Add a trigger for every entity referenced in Conditions or Actions, and manually keep them up to date when making changes to those sections.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions