Help with Dashboard switch

I am working on creating a light duty security system within HA. I have a grouping of several automations on my dashboard. When I turn on the main group switch, it correctly activates all the automations. What I would like to do is make an automation which would add a delay.

IE Turn on the dashboard switch, script waits x seconds, then turns on the group switch. This give me time to leave the house without triggering my automation. The issue I have is how to create a dashboard switch which does an action when manually switched on or off. What would I use for the trigger?

I believe I am looking for something like

- alias: Security System - Away Arming
  inital_state: False
  trigger:   NO IDEA WHAT TO PUT HERE
  action:
    - delay:
        seconds: 10
    - service.automation.turn_on
      entity_id: automation.msensor__basement

Any suggestions or different approach to this solution would be appreciated. Thanks
Jason S.

Well, as with most things there are several ways to do this. In this case you might be better off using a script instead of an automation.

alarm_script:
  sequence:
    - delay: '00:00:10'
    - service.automation.turn_on
      entity_id: automation.msensor__basement

And just activate that.

But if you want a switch for this you could create an input_boolean and check for its on-state, then turn it off again, wait 10 seconds and turn on the sensor automation.

- alias: delayed alarm
  trigger:
    - platform: state
      entity_id: input_boolean.alarm
      to: 'on'
  action:
    # Toggle switch back off
    - service: homeassistant.turn_off
      entity_id: input_boolean.alarm
    # Wait some time and turn the automation on
    - delay: '00:00:10'
    - service: automation.turn_on
      entity_id: automation.msensor__basement