Shelly Switch: MQTT

Hi,
I’m new with HomeAssistant and I like to use my shellies over mqtt. I get the shellies as sensors and it works fine.
And now I like to switch my heating, but I can’t find the correct statement to switch them on. This I can see with my MQTT Explorer. But which statement I need now for switch on? Do I need RCP enable on the shelly?
Bildschirmfoto 2024-07-16 um 22.21.23
I tried this:

switch:
  - name: "Heizung Eltern"
    unique_id: "heizung_eltern"
    state_topic: "shellyplus1pm-eltern/status/0"
    command_topic: "shellyplus1pm-eltern/status/0/command"
    payload_on: "ON"
    payload_off: "OFF"
    qos: 2

Thanks for help!

You can use this GitHub - bieniu/ha-shellies-discovery-gen2: Script that adds MQTT discovery support for Shellies Gen2 devices

Thank you very much. I will try it with the shellies discovery gen2 script.