IF-THEN-ELSE Question from a Rookie


#1

1) Give a description of the problem
When I try to run the simple piston below, the IF commands run fine but the ELSE commands never do. I can only get the commands in the ELSE section to run if I create a separate piston. I am trying to be as efficient and not create separate pistons if I don’t have to.

2) What is the expected behavior?

I want the piston to give one beep if I SHM changes to Armed/Stay or Armed/Away modes and a custom beep if it changes to Disarmed.

3) What is happening/not happening?

The beep happens when I put SHM in either of the Armed/Stay or Armed/Away modes but nothing when I change it to Disarmed.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING


#2

Create two individual IF blocks instead of embedding the second IF block within the ELSE statement :slight_smile:

Or remove the IF block from the ELSE statement and just put the action for the music player.


#3

Works great now! Thanks so much!!!