Looking for ELSE IF feature and Feedback


#1

1) Give a description of the problem
Two queries rather than a problem

  1. Not sure where to find the option in the menu. I was creating a light piston last night using else if, when I went back to it today I can only find the option of adding new IF, just wondering how do I get the else if option back. See last IF statement.

  2. This is a lighting piston, control sitting room lights. 8 in total. When it comes to movie time, I turn off 4 of them, and dim the other 4 to 10%. When it comes to non movie time I turn on all lights to 100%. Just wondering if I have covered the options in the best manner or is there an alternative flow that I should look into for better performance.

2) What is the expected behavior?
Movie lights when turning on should only turn on 4 lights and dim to 10%, when non movie lights are turned on, then all 8 lights should turn on at 100%. In case both set of lights are instructed to be turned on at the same time, the lights that have been instructed to be turned on over the existing lights that are on, take precedent ie if Movie lights are on and all Lights are told to come on, All lights should come on.

The switches I’m using for Movie and NonMovie lights are Virtual Switches so I can leverage this functionality with Alexa.

3) What is happening/not happening?
Working as intended, just want to know how to add another else if and if there is a better way to achieve the same.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)


#2

Seems to me, it would be a whole lot simpler if you used separate IF blocks instead of the structure you are using. :slight_smile:


#3

Agreed… unlike old CoRE, you can have unlimited ‘IF’ statements, so no need for ‘ELSE IF’ statements… they are only really there to appease old dogs :dog:


#4

@jkp, @Robin it’s always good to ask, I shall change accordingly :grin:

Thanks