Help me understand

Moderator: leecollings

Post Reply
FredZ
Posts: 29
Joined: Monday 08 June 2020 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Help me understand

Post by FredZ »

Hello all

Not a programmer, this is why I use Blockly.

I created a script to turn of a switch if any of three events occurred.

It went like this:
if switch1=on or switch2=on or switch3=on
set switch4=off

This didn't work at all.

I then tried this:
if switch1=on
set switch4=off
ELSE if switch2=on
set switch4=off
ELSE if switch3=on
set switch4=off

This worked.

My question is why didn't the "or" statement work but the ELSE statement did?

I'm attempting to understand the fundamental differences here and why I got the result I did.

Regards

Fred
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest