Please help me with my template, helpers, cunfusion

Heyhey
I did create some template switches (hopefully what ive done is called like that).
On Dashboard I created buttons to acces these, to turn automatisations on and off.
Here is the code:

switch:
  - platform: template
    switches:
      keba:
        friendly_name: "Keba"
        turn_on:
          service: keba.enable
        turn_off:
          service: keba.disable
          
  - platform: template
    switches:
      pvsteckdoselaptop:
        friendly_name: "PV Automatisierung Steckdose Laptop"
        turn_on:
          service: automation.turn_on
          data: {}
          target:
            entity_id: automation.PVLaptopladen
        turn_off:
          - service: automation.turn_off
            data:
              stop_actions: true
            target:
              entity_id: automation.PVLaptopladen
          - service: switch.turn_on
            entity_id: switch.steckdose_laptop
            
  - platform: template
    switches:
      pvheizungbuero:
        friendly_name: "PV Automatisierung Heizung Büro"
        turn_on:
          service: automation.turn_on
          data: {}
          target:
            entity_id: automation.PVStromheizung
        turn_off:
          service: automation.turn_off
          data:
            stop_actions: true
          target:
            entity_id: automation.PVStromheizung

Those switches work, but is there a way to group them, to get a better overview?
On some youtube videos I found stuff like:

tempate:
  switches:
    - name: Swicht1
      #[...]
    - name: Switch2
#[...]

But when doing this, I get formatting errors.

And another question for example to my pvsteckdoselaptop Switch.
I could have created this in the UI via Helpers, and create a script or automatisation, to do what I want if I change the switches’ state.

Is there any difference between “UI Helpers” and templates?
Whats the benefit of createing those template in code or in UI?
And why I dont see the code created templates in the UI under helpers?
Isn’t that the same?

Have you tried using a grid card in the dashboard to group the buttons?

This is a vertical stack of grid cards, each with 10 columns. Since the biggest group has only 9 buttons, they come out as rows.

Hey man
Thanks for your answer. But i donz want to group Buttons on my dashboard, but Code in config.yaml :slight_smile: