Cannot have 4 "OR" statements in one "IF"?

Moderator: leecollings

Post Reply
elgarne
Posts: 36
Joined: Monday 26 May 2014 14:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Cannot have 4 "OR" statements in one "IF"?

Post by elgarne »

Hi,

If I do what is depicted in the attached figure, I cannot save my event and nothing shows up in the logs. Any reason for that?
Thanks.
Image
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Cannot have 4 "OR" statements in one "IF"?

Post by Egregius »

Try lua or php, you'll have endless possibilities.
elgarne
Posts: 36
Joined: Monday 26 May 2014 14:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cannot have 4 "OR" statements in one "IF"?

Post by elgarne »

Thanks. But any reason for that?

BTW, if some moderator could move the thread in the events section, I'll be grateful.
mrf68

Re: Cannot have 4 "OR" statements in one "IF"?

Post by mrf68 »

I see a + sign in front of the If. Do you have an elseif statement after the first if? If not, choose under Control the If statement without the + sign and try again.
20151224 elseif.jpg
20151224 elseif.jpg (7.9 KiB) Viewed 1682 times
I tried this one and it works.
20151224 ororor.jpg
20151224 ororor.jpg (26.91 KiB) Viewed 1681 times
elgarne
Posts: 36
Joined: Monday 26 May 2014 14:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cannot have 4 "OR" statements in one "IF"?

Post by elgarne »

Yes, I have an "elseif" statement.
mrf68

Re: Cannot have 4 "OR" statements in one "IF"?

Post by mrf68 »

And whaf if you try it as a single 'if then'?

Just tested it with this:
20151225 1.jpg
20151225 1.jpg (31.29 KiB) Viewed 1642 times
.. works great.
elgarne
Posts: 36
Joined: Monday 26 May 2014 14:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cannot have 4 "OR" statements in one "IF"?

Post by elgarne »

Actually, it seems I'm limited in the number of 'items'. It I have 2 'elseif' statements and 3 'or' in the first if, then it does not save the event but does not display an error message.
With 2 'or' and 2 'elseif', it works. I have to delete one 'else if', in order to be able to use 3 'or'.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest