I am debugging an issue with a piston that has been working fine for over 2 years. The piston simply looks to see if a button was pressed and then toggles the lights. The only way I can get the piston to work currently is not clean looking and redundant. Here’s my current code which works:
/**************************************************************/
/* Button: Office */
/**************************************************************/
/* Author : Andrew */
/* Created : 2/16/2019, 10:58:23 PM */
/* Modified : 12/27/2020, 12:32:34 PM */
/* Build : 24 */
/* UI version : v0.3.110.20191009 */
/**************************************************************/
execute
if /* #1 */
Office Button's button gets pushed /* #2 */
then
if /* #19 */
All of Office Spot Light 1's, Office Spot Light 2's, and Office Spot Light 3's switch are off /* #20 */
then
with /* #21 */
Office Spot Light 1, Office Spot Light 2, and Office Spot Light 3
do
Turn on; /* #22 */
end with;
else
with /* #3 */
Office Spot Light 1, Office Spot Light 2, and Office Spot Light 3
do
Turn off; /* #4 */
end with;
end if;
end if;
if /* #9 */
Office Desk Button's button gets pushed /* #10 */
then
with /* #11 */
Office Lights
do
Toggle; /* #12 */
end with;
end if;
if /* #17 */
Office Button's button gets pushed /* #18 */
end if;
end execute;
I can’t seem to get the piston to work unless I have that second trigger for Office Button, nor can I get the spot lights to work if I use toggle. I can see the button gets triggered in the smartthings app but the piston doesn’t seem to be triggered without the second trigger.
Is there anything I can do to debug this issue further?