My understanding might be off here, but thatās not really equivalent, right? Triggers are event-based, conditions are state-based. If you make a template trigger that includes your āconditionā, it will also trigger on events of the āconditionā that cause the template to render ātrueā.
With a template trigger, the āeventā is the template evaluating to true. If you include conditions that maintain the templateās falseness, it will never fire. Having your conditions allow the template to render true when they shouldnāt is just a poorly written template.
No, events are based on states changing. Conditions are based on the current state.
I guess Iām not seeing how to do the following with a single template trigger: I want to fire an automation if the front door opens between 9am and 5pm. If the door opened at 8am, and stayed open, I do not want it to fire when the time changes to 9am. Iād love to be able to simplify some of my automations using just template triggers, but Iām not seeing how do this-- maybe I just write poor templates.
trigger:
- platform: state
entity_id: binary_sensor.front_door_contact
from: 'off'
to: 'on'
condition:
- condition: time
after: '09:00:00'
before: '17:00:00'
Itās funny, I had today, for the first time wanted this exact option. Wanted, not needed necessarily as I knew that I could probably template the condition in to the trigger, but it seems that every time I want to do something via templates I end up spending hours working it out or end up having to ask this awesome community.
So for me I think it would be nice to achieve this quickly via the Ui.
So one vote from me, but donāt forget you need to vote for your own feature request as well
To be clear, I wouldnāt do it this way however, itās effectively what this Feature Request is asking for, namely the ability to incorporate several considerations into a single trigger.
Isnāt it just asking to have the ability to move conditions to the trigger itself? How would trigger-specific conditions break the condition functionality?