I think Ryan780’s point was that if the physical door was closed it would cancel the alarm. This would not be good if an intruder broke in and could simply disarm the system by shutting the door behind them.
I thought the cancellation policy was based on condition state changes, i.e. if SHM status changes, and not triggers. I thought triggers were just passed to the piston as an event. I could definitely be wrong about that but I’m almost positive the alarm has gone off by mistake even after the door was closed.
The async is probably just a misunderstanding on my part, too. I thought it meant the piston won’t wait for whatever action has async assigned to it, and continue to proceed with the rest of the actions. I didn’t know the rest of the asynchronous actions had to be lumped into the same “with”.
The reason I use two virtual sensors and two statements is I label the virtual sensors “Front Door Alarm” and “Back Door Alarm” in SHM so when I get push notifications it tells me which door the intrusion happened on. Not 100% necessary and maybe there’s a more elegant way to do this. I’ve actually updated this piston and added some motion sensors that combine to a single virtual motion sensor, similar to as suggested.
If I’m wrong about the trigger state change canceling the piston and how async works that would be awesome if you could clarify more on how to use properly. I’ve always felt like the piston worked as expected so I never questioned it. Thanks!