Q1: I’m working on an automation that turns roof heat strips on between 10 and 40 degrees F, and off when the temperature is outside that range. I’m using an input_boolean (snow on roof) to enable and disable the automation as a condition. I want to be able to change the boolean state to turn on and off the automation. I have this working, but if the current temperature is inside the range - between 10 and 40 degrees, the automation doesn’t appear to trigger until I go outside the range and come back. What I want - when the boolean gets turned on I want that automation to trigger and act if the temperature is already inside the range of the trigger. Is there a way to do that?
Q2: Since I’ll probably have more than one automation that uses these below and above temperature set points, I’d like to make them input_number values and use them in the automations. I’m using the automation GUI to create them and am not clear on how to replace my current values of 10 and 40 with input_number.roof_heat_strip_min_temperature and input_number.roof_heat_strip_max_temperature? I would love to see some examples.
Sorry, here’s the yaml the GUI created. (Is there a better way to get the yaml from the GUI?) I’ve been testing so the temp set points are higher.
I think my problem is assuming that when the temperature changes, and it’s within the above/below limits, this automation should receive and event. I don’t think that’s happening and I can understand why things might work that way.
Another way I think I might be able to do it - an automation that receives an event every time the temperature changes, and use conditions to check to see if the temperature is within a range to act.
I also don’t want to hard-code the above/below limits and want to use numeric helpers instead.
Wow! I tried both those solutions and they both worked great! My biggest stumbling block was trying to figure out how to correctly enter the value_templates via the GUI automation editor.