Media_player.join service via ESPHome

So i’m using Sonos in my home. Via ESPHome i’m trying to use media_player.join Home Assistant service call to join a speaker, but it does not seem to work when i try to use:

 - homeassistant.service:
      service: media_player.join
      data:
        group_members: media_player.sonos_zolder
      target:
        entity_id:
          - media_player.sonos_woonkamer

i get [target] is an invalid option for [homeassistant.service]. Please check the indentation.
But i think the indentation is good, or am i missing something simple here?
This does work when i use it in Home Assistant itself.

That doesn’t seem to work either.

Then i get “Must be string, got <class ‘esphome.helpers.OrderedDict’>. did you forget putting quotes around the value?.”

INFO Reading configuration /config/esphome/d1_mini_socket_attic_balcony.yaml...
Failed config

binary_sensor.gpio: [source /config/esphome/d1_mini_socket_attic_balcony.yaml:31]
  platform: gpio
  pin: 
    number: D6
    mode: INPUT_PULLUP
    inverted: True
  name: Socket Touch Button Attic Balcony
  on_click: 
    - min_length: 50ms
      max_length: 350ms
      then: 
        - switch.toggle: socket_relay_attic_balcony
    - min_length: 500ms
      max_length: 5s
      then: 
        - homeassistant.service: 
            service: media_player.volume_set
            data: 
              entity_id: media_player.sonos_zolder
              volume_level: 0.10
        - homeassistant.service: 
            service: media_player.join
            data: 
              group_members: media_player.sonos_zolder
              
              Must be string, got <class 'esphome.helpers.OrderedDict'>. did you forget putting quotes around the value?.
              target: 
                entity_id: 
                  - media_player.sonos_zolder
        - logger.log: Sonos Zolder Geactiveerd

did You ever get to solve this?

I had the same error this this code:

        - homeassistant.service:
            service: light.toggle
            data: {}
            target:
              entity_id: light.tira_led_entrada

but thisone is working:

        - homeassistant.service:
            service: light.toggle
            data:
              entity_id: light.tira_led_entrada