I need a special automation rule which needs more then simple actions…
I have a WUnderground Weather Station (outside) and also Fibaro Motion Sensor (inside)
My goal ist to get the following working:
If the outside temperature is higher then the inside temperature and also the outside temperature is higher then 23 Degree Celsisus I want to close the roof windows.
The Automation I think I can do it myself, but for comparing the temperature values I guess I will need a value_template? Here I am struggeling how I could to the comparision…
There are a few issues with your automation. First, you’re triggering it every 5 minutes. That’s not necessary. It can “wake up” (automatically) anytime the inside or outside temperature changes to check how they compare. (This is what I’m doing in the template trigger.)
Next, in a template you (generally) need to use states.entity_id.state or states('entity_id').
Lastly, in your action section you have two actions, but only one ‘-’. Each action (e.g., each service) needs its own ‘-’.
Let me know if you have any questions. Happy to explain further.
The trigger “every 5 minutes” was for “if someone opens the window manually, it should close again”.
REgarding the action: This is the problem, when creating automations via the Fronted, then they look different to what users do manually and then it is hard to understand. I think I should completley go away from editing via the frontend.
Again, you shouldn’t need to check every 5 minutes, unless that’s what you want to do. I.e., if you want the window to close if someone opens it under certain conditions, then that’s the way you should write the automation. The main thing to remember is the trigger part is the “when” part, and the condition part is the “if” part.
Well, the frontend editor shouldn’t let you create an invalid automation. But, yes, it does tend to format unnaturally. I gave it a shot when I first started with HA, but within about 37 milliseconds I decided to skip it and edit the files directly.
How so? Is it causing errors? Or is it just not doing what you want. If the former, what is the error? If the latter, maybe you could explain what you’re wanting it to do that it isn’t. (I may have misunderstood your requirements.)
Good to hear! BTW, it’s helpful if you check one of the “Select if this reply solves the problem” check boxes so others scanning through the list of topics looking to provide help know that your problem is solved and you don’t need help with it anymore.
This works if these states are actually numbers. If they are numbers represented by a string (which sometimes happens, and is also sometimes hard to tell), then you could do this instead: