Hello Guys.
I'm having a bit difficult with a logic, the code is:
This doesn't work, in the debugger i can see that the mode changes to 1, then it seems like it doesn't execute the next IF statement??
If i do like this:
it works like it should.... What am i doing wrong?
The Heating.Mode is 1 byte output from the RTR widget.....
I'm having a bit difficult with a logic, the code is:
Code:
if sh.Sleeping_Room.Heating.Mode == 1: if sh.Sleeping_Room.Heating.SP() > 5.0: sh.Sleeping_Room.Heating.Valve('1') else: sh.Sleeping_Room.Heating.Valve('0') elif sh.Sleeping_Room.Heating.Mode == 3: if sh.Sleeping_Room.Heating.SP() > 2.0: sh.Sleeping_Room.Heating.Valve('1') else: sh.Sleeping_Room.Heating.Valve('0') else: sh.Sleeping_Room.Heating.Valve('0')
If i do like this:
Code:
if sh.Sleeping_Room.Heating.SP() > 5.0: sh.Sleeping_Room.Heating.Valve('1') else: sh.Sleeping_Room.Heating.Valve('0')
The Heating.Mode is 1 byte output from the RTR widget.....
Kommentar