Switch Was On Statement Not Working As Expected


#1

1) Give a description of the problem
If statement is evaluated as False when I would expect it to be true.

2) What is the expected behavior?
If a light is switched on and stayed on for less than 5 seconds, other lights should turn on (essentially a ‘double-tap’ to turn on all lights on a given floor)

3) What is happening/not happening?
The “IF” statement that drives this evaluates as false when the light is switched ON and OFF. Not sure how to use the “was” function and could use a little help.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
11/29/2017, 9:23:10 PM +708ms
+1ms ╔Received event [Master Fan Lights].switch = off with a delay of 177ms
+161ms ║RunTime Analysis CS > 19ms > PS > 58ms > PE > 85ms > CE
+170ms ║Runtime (37657 bytes) successfully initialized in 58ms (v0.2.0fe.20171109) (168ms)
+171ms ║╔Execution stage started
+223ms ║║Comparison (enum) off was (string) on = false (46ms)
+224ms ║║Condition #4 evaluated false (49ms)
+225ms ║║Condition group #1 evaluated false (state did not change) (50ms)
+226ms ║╚Execution stage complete. (55ms)
+234ms ╚Event processed successfully (234ms)
11/29/2017, 9:23:09 PM +717ms
+1ms ╔Received event [Master Fan Lights].switch = on with a delay of 155ms
+82ms ║RunTime Analysis CS > 15ms > PS > 39ms > PE > 28ms > CE
+92ms ║Runtime (37656 bytes) successfully initialized in 39ms (v0.2.0fe.20171109) (90ms)
+93ms ║╔Execution stage started
+119ms ║║Comparison (enum) on was (string) on = false (20ms)
+121ms ║║Condition #4 evaluated false (24ms)
+121ms ║║Condition group #1 evaluated false (state did not change) (25ms)
+123ms ║╚Execution stage complete. (30ms)
+131ms ╚Event processed successfully (131ms)


#3

the on and off interval may be too short to register with ST.