Switch off after 2 seconds sonoff mqtt

Hey All,

I have the below config that allows me to switch on a sonoff switch, it works fine however I want the switch to be switched off 2 seconds ish after it being switched on. Whats the best way to achieve that?

- platform: mqtt
  name: "Gate"
  state_topic: "stat/sonoff_gate/POWER"
  command_topic: "cmnd/sonoff_gate/POWER"
  availability_topic: "tele/sonoff_gate/LWT"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: true

Have you read the documentation on writing automations? This is extremely basic.

watch drzzs

this will point down the right track