When I try to use triggers for automation the automations don’t seem to work.
I think I may be missing some thing, however I cant seem to work it out. I am new to this YAML, and HA has so may variables its hard to know where to look to find answers. Its probably cause I don’t know the terminology when searching.
I can get it to work if I use conditions and not the trigger id in the Options
Any pointers would be appreciated.
I have a high and low input setup so i can change the temp settings without having to edit the automation.
If I setup the options with a condition it works but I cant use the input numbers in the conditions.
You may also want to consider how to handle the sensor becoming unavailable; the template will generate an error when that happens unless you supply a default value to the float filter.
Also note that the trigger will only fire when the template changes from false to true. If it is already true and you change the input number so that it is still true, nothing will happen.
Based on that trace, you manually ran the automation… so it wasn’t trigger by either id: temp_high or id: temp_low… and you don’t have options in your Choose to deal with that.
The trace was just to show that the trigger is still false even though the actual conditions have met the criteria of the temp sensor going higher than the input that was set.
At some stage the sensor temp changed from below the set temp to equal it/go past.
What am I missing. its a basic if sensor temp >= than input temp then trigger?
You seem to be missing the fact that the triggers are not conditions.
Triggers are events that start an automation.
In the case of your example it is the event of either one of the templates’ rendered values turning from false to true.
Conditions are tests that must be met before an action can be run.
In your automation, the only conditions you have are the ones in the Choose action and they are based on the trigger ID, if there is no trigger event, there is no trigger ID.
As described in the troubleshooting link I provided earlier… To effectively test your automation, you need to alter the state of one of the entities in the template such that the template renders false, then either change it back manually or wait for it to update naturally so that the template renders true. Then the automation will trigger.
however when I change it to my previous code to include the input.number it fails.
I still don’t understand why the event (not the condition) doesn’t trigger when it should. Is there a problem with my input.number setup? or the ‘States’ boolen
Is there another way to use the input.number in the conditions?
I am trying to understand it all, but to me it seems overly complex. I am not arguing, just trying to figure it out.
I appreciate anyone that takes the time to reply. Thanks
Select Developer tools in the side menu, then Template, then paste the teplate part of your trigger. My result will not be correct since I do not have your sensors