Combine Automation for on/off (MQTT) in one button

Dear all -
I recently started with Home Assistant and the options are just overwhelming (amazing)!

Yesterday, I created two automations that will publish a value to start loading my PV battery from the grid. Each automatization by itself works if I fire them manually.

Now I’d like to combine both in one switch button.
If I activate the switch button → Fire Automatization “ON”
If I deactivate the switch button → Fire Automatization “OFF”

Could you help me to find the best solution for implementation / configuration?

Automatization “ON”:

alias: Batterie Netzladen An
description: “”
triggers:
conditions:
actions:

  • action: mqtt.publish
    metadata: {}
    data:
    qos: 0
    retain: false
    topic: evcc/site/batteryGridChargeLimit/set
    payload: “0.30”
    mode: single

Automatization “OFF”:

alias: Batterie Netzladen Aus
description: “”
triggers:
conditions:
actions:

  • action: mqtt.publish
    metadata: {}
    data:
    qos: 0
    retain: false
    topic: evcc/site/batteryGridChargeLimit/set
    payload: “-0.30”
    mode: single

Thanks in advance

How to format code or use the</> key in the post editor.