So, by following tutorials and forum threads i have been able to create a rule that controls electric heating in my house using Netatmo temperature sensors and Wemo insight switches.
The rule goes something like this
If hourofday < 5
turn off heating
else
if temperature < 22.9
turn on heating
else if temperature > 23
turn off heating
So, very baseline stuff.
But, next step for me is to create some sort of HeatingMode state along with a WantedTemperatureOverride so that i can choose to override the temperature lets say if i am going to be away for some days.
My pseudocode would look something like this
HeatingMode = Auto
WantedTemperatureOverride= 16
If HeatingMode = Auto
If hourofday < 5
turn off heating
else
if temperature < 22.9
turn on heating
else if temperature > 23
turn off heating
Else
if temperature < WantedTemperatureOverride - 0.1
turn on heating
else if temperature > WantedTemperatureOverride
turn off heating
So my question is obviously, how could i implement my two global variables and make them possible to manipulate manually so that they work in my rule?