Anybody that can tell me how to accomplish this easy thing.
Got temperature sensor outside and inside, and a switch that is turning on and off a fan.
If outside temp is below 19 celcius and inside is over 20 celcius turn on fan if its off but only between 10:00 and 22:30 otherwise turn of fan of its on.
With this in place I think I will be able to understand a lot better how it works.
So i assume you want to handle all the logic in Node-red for information flow and just leave HassIo and Home Assistant to do the display side and data collection/retention
I would do a couple of things
a small flow that ran every minute - to check the current time and set a variable such as FanOnTime=yes - this flow would just check if the time was greater that 10:00 and less than 22:31 and see the variable to true - any other time it would set it to false. This flow would use the inject node to run every minute and a change node to set the variable
You would then have a 2nd flow that would check this variable - if true - it would then measure the outside temperature, if less than 19 then check inside temp - if greater than 20 then turn on fan
This could be written as a function node - but would be more easily done with a couple of switch nodes