Combine multiple data entries

Hi,

I wonder someone could help me out on this yaml configurations. I have 2 squeezebox players at study room which i want to sync (linked) to the main LMS player when i execute the service ‘squeezebox.sync’.
Instead of executing 2 times the squeezebox sync, is there a way to combine the 2 ‘study1’ & ‘study2’ player and execute with only 1 time ‘squeezebox.sync’ statement ? thanks

- alias: Link Study room
  trigger:
    platform: state
    entity_id: input_boolean.pcp_study_link
    to: 'on'
  action:
    - service: squeezebox.sync
      data: 
        entity_id:  media_player.main_player
        other_player: media_player.study1
    - service: squeezebox.sync
      data: 
        entity_id:  media_player.main_player
        other_player: media_player.study2

I don’t use this stuff, but according to the squeezebox integration code:

Service squeezebox.sync is deprecated; use media_player.join_players instead

So maybe:

- service: media_player.join
  target:
    entity_id: media_player.main_player
  data:
    group_members:
      - media_player.study1
      - media_player.study2

hi Phil,

Thank for the advice and the heads-up about squeezebox.sync.
Will try out the media_player.join command instead.

Really appreciate you reaching out to help. Have a nice day.

Kwa