Button card to trigger what a real button does

Hello hello. I seem to be very confused with things.
Maybe someone can point me to a tutorial on this?

I have some ikea and Aqara buttons. I press or double press them and they do things

I want to add that button to my dashboard

One button runs a lot of things. Setting all lights off. Turning off speakers then it waits 1min and sets cctv to away mode.

Why is it so hard to just add a button for this?
I don’t want to make the ikea button trigger but I want the UI to have the equivalent of that button. Does that sort of thing exist?

I did try setting one to trigger a scene? But that misses out the timer and the other actions

All the best

I haven’t done much with delays and sequences, but you can use a button in the UI to call a script or automation. In that script, you can set scenes with scripts and apply a conditional sequence with delays or other inputs like occupancy to determine where to perform certain actions.
Below I have used the GUI to write a script:

Here I have the YAML of this automation with some spotify details redacted:

alias: UI Button Test Script - All Lights off
sequence:
  - service: scene.turn_on
    target:
      entity_id: scene.all_lights_off
    metadata: {}
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: media_player.play_media
    target:
      entity_id: media_player.master_bedroom_stereo
    data:
      media_content_id: >-
        spotify://blahblahblah/spotify:playlist:blahblahblah
      media_content_type: spotify://playlist
    metadata:
      title: Bedtime Playlist
      thumbnail: https://i.scdn.co/image/blahblahblah
      media_class: playlist
      children_media_class: track
      navigateIds:
        - {}
        - media_content_type: spotify://library
          media_content_id: spotify://blahblahblah
        - media_content_type: spotify://current_user_playlists
          media_content_id: spotify://blahblahblah/current_user_playlists
        - media_content_type: spotify://playlist
          media_content_id: >-
            spotify://blahblahblah
mode: single
icon: mdi:string-lights-off

In this script I call a scene that turns all the lights off, then waits a minute, then plays a Bedtime piano playlist in my bedroom.

Then create a button something like this:

Here is the YAML:

show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: script.ui_button_test_script_all_lights_off
  data: {}
  target: {}
entity: script.ui_button_test_script_all_lights_off
name: Bedtime Mode
icon: mdi:bell-sleep
hold_action:
  action: none

The Icon on the button will show that it is running while waiting for the delay to finish. Pressing it more than once should follow the Mode behavior set in the script. I have mine configured to single, so it should not do nothing to restart the script and perhaps generate a warning in a log that that a script was called while it is already active.