Hello. I am having a hard time getting this automation to function. I tried changing the state in developer tools and it will never fire. Any ideas? Thanks in advance
you define a entity in the template, not a service.
Try to always use a service and a entity_id. When you define a entity with a template you have to use data_template
This is correct for scripts, you can call them by using the entity_id as the service.
@bookandrelease
You have a typo, you wrote script.umidifier_power_off instead of script.humidifier_power_off
Please be informed that your automation will only fire if the humidity has been between 38 and 52 and then changed to a humidity above 52 or below 38. It will not trigger if your humidity is for example 53 and changes to 54.
Yes, I realize that it’s TWO automations, but for me the K.I.S.S. (keep it simple stupid) means I don’t try to get fancy and condense into one, but just leave what works alone and have two
Also, FWIW, if I put this into Developer Tools -> Template:
What do you get when you put the action part into the template editor (Sidebar -> Developer Tools -> Template)? If you trigger the automation manually (which skips all triggers and conditions and goes directly to the action part), does it execute the desired script? I copied your action part and changed the entity to one I have and it gives me the desired result.
That was purely an example to show the raw humidity state value and the fact that suffixing with | int would allow the > calculation. Thx for your input though.