Lebo2d9 wrote:Hi,
I have also a strange behavior with a nested if else-if
The 2 write to log are always executed.
Is this normal or have I done soemthing wrong?
K3rryBlue wrote:Seems that the structure is correct. Both conditions if vakanie=off and else if vakanie=on are different, it should never execute both. In either case if one is true the other is always wrong. Unless "on/off" is not valid for this switch.
The issue is most probably the simple (yet disappointing) fact that nested if's do not work in Domoticz's Blockly implementation (as it has been covered in numerous of these threads discussing various Blockly issues in Domoticz

). If you write the logic with just one "if - else" then it should work (i.e. add the the first condition to both of the nested conditions to remove the first condition fully)...