I have the following Blockly "code":
Is something broken or have I missed something?
I've had problems getting it to work properly so I added a few debug messages to see which triggers that worked. Turns out that ALL of them trigger, when the Lux value is 0.Lux sensor triggers all "If else" but should only trigger one
Moderator: leecollings
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Lux sensor triggers all "If else" but should only trigger one
Unfortunately nested if's do not work and with "else if" the conditions must be set so that all of them mutually exclude each other, otherwise all matching condition are executed even if a prior condition matches. See e.g. http://www.domoticz.com/forum/viewtopic ... fs#p128152
http://www.domoticz.com/forum/viewtopic ... fs#p151162
http://www.domoticz.com/forum/viewtopic ... fs#p151162
Re: Lux sensor triggers all "If else" but should only trigger one
Thanks, that explains it!Nautilus wrote: ↑Wednesday 22 November 2017 10:43 Unfortunately nested if's do not work and with "else if" the conditions must be set so that all of them mutually exclude each other, otherwise all matching condition are executed even if a prior condition matches. See e.g. http://www.domoticz.com/forum/viewtopic ... fs#p128152
http://www.domoticz.com/forum/viewtopic ... fs#p151162
-
- Posts: 20
- Joined: Thursday 29 December 2016 9:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Lux sensor triggers all "If else" but should only trigger one
Maybe a hijacking of the thread but does anyone know why the else if bug never is fixed? There are two control cmds in Domoticz and one of them doesn’t work...
This might sound very ungrateful but that is not my purpose I just want to know why there doesn’ t seem to be any interest at all to solve this which if solved would make Blocky so much more useful.
This might sound very ungrateful but that is not my purpose I just want to know why there doesn’ t seem to be any interest at all to solve this which if solved would make Blocky so much more useful.
Who is online
Users browsing this forum: No registered users and 1 guest