Process action section before condition for trigger based template entities
#21
Unanswered
TheFes
asked this question in
Integration enhancements
Replies: 1 comment
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Integration name
Template
Link to integration documentation on our website
https://www.home-assistant.io/integrations/template
Describe the enhancement
Currently, like for automations, the
conditionsection in a trigger based template entity is processed before theactionpart. For automations this makes sense, but for template entities theactionpart is mostly supporting, and used to perform actions which provide a response to be used in the template entity itself.By processing the
actionpart before theconditionpart in a trigger based template entity, you can use the variables created in theactionpart in conditions, so you don't have to make complicated templates for the state and attributes to prevent the previous valid state to be lost in case the provided variables are not correct.Use cases
It will make it easier to ensure a valid state and valid attribute values without need to refer to
this.stateAnything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions