I am new to the automation/scripting stuff here and was trying to figure out how to get my Ecobee to turn on my HVAC fan when there is a temperature differential between two of its sensors. I tried looking through the scripting help but I’m struggling to piece it all together.
So far I figured out how to pull in the sensor data for one sensor but I’m not sure how to compare the two and act based on that. Is there somewhere you can point me to help me figure this out?
I do something similar for humidity and my bath fans. I compare the outside-the-bath-humidity to the inside-the-bath-humidity in a template sensor and turn on the fan if the net difference is too high.
I leave it to the automation. Using my example, the automation would be a numeric state trigger for sensor.master_bath_net_humidity, above: 5, action: turn on fan.
You could rework it as
That’s just so I get tenths, ie 40.1%, and not 40.1001%
Cool so I got this far in the template builder in dev tools and it seems to be working but when I put it into the yaml using studio code server is lights up like a christmas tree with errors. What am I missing? Code snippet is below: