I am using the SmartLighting app to control a Zigbee switch. I want to control the light using an addition button. The button is a Xiaomi button with a single push action. My setting:
What do you want to do?
Toggle on & off
I can set up the button to trigger a toggle. However, doing so only accounts for the state of the button and not the switch’s. i.e. if the light was turned on manually, pressing the mi button 1 time does nothing. I have to press it again to turn it on. Vice versa if the light was turned on by button and turned off via switch manually.
I previously used 2 SmartApps to address this. One to turn light on when switch is off and another to turn light off when switch is on.
This worked for 2 years, until my switch went bad and need to be replaced. Now, when I set it up again using the new SmartThings app, it no longer work properly. It appears that now 1 action caused both SmartApps to be executed one after another. One action will cause the light to turn off and immediately turned on again.
Is there a simple solution to this simple scenario?