Group switch not work

Hi all. I’m stuck with something that should be simple. I try that by pressing a button two switches change state. I tried to form a group but did not succeed. What would be the correct way to do it. thanks

          - type: custom:button-card
            tap_action:
              action: call-service
              service: switch.turn_toggle
              target:
                entity_id:
                  - switch.10013ab472_1
                  - switch.10013ab472_2            

The group is detected but I don’t know how to turn it on or off

group:
  luz_comedor:
    name: Luz comedor
    entities:
      - switch.10013ab472_1
      - switch.10013ab472_2
          - type: custom:button-card
            tap_action:
              action: call-service
              service: switch.toggle
              service_data:
                entity_id:
                  - switch.10013ab472_1
                  - switch.10013ab472_2  

Thanks for the reply. It didn’t work. I press the button and nothing happens. I am trying to implement a two channel sonoff touch. Another thing I don’t understand is why 4 entities appear even though it has two buttons. In the ewelink app it has two more buttons that are used, one to turn all of them on and the other to turn all of them off. Giving me 4 entities makes sense, but I can’t do anything with those two entities. I would like to understand how these two entities are used and how a group of switches can be turned on or off.

The group in ui mode works but in yaml mode I don’t know how. And the 2 of the 4 entities that sonoff touch (2) gives me in ui mode when I select them nothing happens.

I found that the service to turn a group on or off is homeassistan.turn_on but toggle doesn’t work

          - type: custom:button-card
            name: Luz Comedor
            tap_action:
              action: call-service
              service: homeassistant.turn_on
              service_data:
                entity_id:
                  - group.luz_comedor

This is the way I found to solve it. I still don’t know what two of the four entities that a two-channel sonoff touch is for

          - type: custom:button-card
            name: Luz Comedor
            entity: switch.luz_comedor
            template:
              - base
              - icon_pendants_3
switch:
  - platform: template
    switches:
      luz_comedor:
        value_template: "{{ is_state('group.luz_comedor', 'on') }}"
        turn_on:
          service: homeassistant.turn_on
          entity_id: group.luz_comedor
        turn_off:
          service: homeassistant.turn_off
          entity_id: group.luz_comedor    

group:
  luz_comedor:
    name: Luz comedor
    entities:
      - switch.10013ab472_1
      - switch.10013ab472_2