I often use multiple methods which all flip the same Simulated Switch.
(which represents whether I am home or not)
In other words:
When my presence sensor detects I am home, it turns on WCmoreHome switch…
When my GPS sees that I am home, it turns on WCmoreHome switch…
If I say, “Alexa, I am home”, it also turns on WCmoreHome switch…
If my phone can see my home WiFi, it turns on WCmoreHome switch…
If my piston detects my phone connected to my router, it turns on WCmoreHome switch…
Then, in webCoRE, I program a single piston that is monitoring the Simulated Switch.
IF WCmoreHome changes to on
Then do welcome home stuff
END IF
IF WCmoreHome changes to off
Then do goodbye stuff
END IF
The beauty of this redundancy is even if one lags behind (or fails for some reason), the others will still initiate the switch. (and the action takes place when the first event happens. The other events are ignored, since the SimSwitch is already on by then)