Arm HSM rule with button

Evening, i've got a sonoff button which i'd like to have arm a hubitat safety rule when pressed then disarm when pressed again. what would be the easiest way to do this through rule machine?

You could do the following:

Trigger:
Button 1 press

Action
If HSM disarmed
Arm HSM Home
Else
Disarm HSM
Endif

1 Like