I am strugling with my flows to to switch on a device (in my case a fan but could be any device).
The problem is I have multiple rules that are sometimes even dependend.
Problem:
Determine the correct trigger to switch On the fan
Determine the correct trigger to switch Off the fan
Rules
The ON rules:
- when the CO2 level > “extremely high” the fan should always go on
- when the CO2 level > “high” the fan should go on
- the fan should not go on when the outside temperature is > 20. (Except when CO2 > extremely high)
- the fan should go on when outside temp < inside temp AND expected temp the next day os >19degrees (cooling down in summer)
- the fan should not go on when inside temp < 14 (prevent going below dew point)
THE off Rules
- when the CO2 level > “extremely high” the fan should not turn off
- when CO2 < “normal” the fan should go off
- when the inside temp < outside temp AND the expected temp is below 19 the fan should go off
Probably more rules to Add.
Making a lot of seperate flow could become very complex.
I was thinking about the bayesian probability
Any other suggestions???