Building blocks for automation triggers #1279
Replies: 1 comment 2 replies
-
|
As a workaround you can play with trigger and conditions in another way, keeping in mind that there is no limitation to use the same test both in the triggers and in the conditions. example for the "At earliest" (In plain text):
conditions:
actions
In yaml: This is enough to launch the automation as you wanted. (at 6.30 the automation will launch and stop if light not above 100, when light reaches 100 the automation will launch and be stopped if too early). The cover will only be open when light above 100 and after 6:30. Same kind of logic can be used for the "at latest" case keeping in mind the basis for automation:
Thus in plain text the "at latest" is even simpler, the first trigger triggers the automation, then it is done...:
conditions
actions:
Note: if you really want to avoid the double execution when light goes down before 21:00, you have multiple solution:
triggers:
Thus the second trigger will only be raised if the first was not used. Exemple of a template trigger: Debouncer is more tricky.
|
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 think it would be great if we had some basic building blocks for automation triggers so that users can easily create useful automations and debug them with ease.
Some example building blocks I could imagine include:
This could prevent filling the automation debugger with traces that don't run any actions due to action conditions that would be used otherwise and thus lead to easier to debug automations.
Use cases
Debouncer
Start a hot water recirculation pump for 5 minutes when presence is detected, but only once every hour to save energy
At earliest
Open blinds when outside brightness is above 100 lux (numeric state trigger), but not before 6:30
At latest
Close blinds when outside brightness is below 100 lux, but latest at 21:00
Current workarounds
Currently a user would need to use helper entities or create complex automations. Examples:
Both of these are not very user-friendly and took me, a HA integration developer since 8 years, a whole afternoon to figure out when moving schedule-automations from a different system (where this was a 3-click action) to HA. I can only imagine how hard this would be to accomplish for a HA beginner not used to find and understand answers in community forums 🙃
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions