Two automations in one button

Hi,
Im new here and Im trying to add button wich could toggle of/on two automations at one

show_name: true
show_icon: true
type: button
tap_action:
  action: toggle
entity: automation.test_on
show_name: true
show_icon: true
type: button
tap_action:
  action: toggle
entity: automation.test_off

I just need to merge this two codes

Perhaps create a script that calls both automations, and call the script from your button.

Be aware, of the issues regarding triggers and condiitions. This thread describes it well

thanks, that was what I needed