Info automation

Hello, I am currently using home assistant with ESP8266 in mqtt.
With an automation I have configured a switch1 as a button that lasts 3 seconds. The following code

  triggers:
    - platform: state
      entity_id: switch.3
      to: 'on'
      Joined:
       seconds: 03
       
  action:
    - service: switch.turn_off
      entity_id: switch.3

Now I would like to make sure that when switch1 goes into action, switches 2 and 3 are completely disabled. Can someone help me? Thank you