Skip to content

refactor sync. #34

@Squixx

Description

@Squixx

Current method of syncing will be deprecated.

can be refactored to:

  # LMS GUI Player_1 Sync Controls - on
  - alias: "LMS GUI Player 1 Sync Controls - ON"
    initial_state: true
    trigger:
      - platform: state
        entity_id: input_boolean.lms_player1_sync
        to: "on"
    action:
      - service: media_player.join
        data_template:
          group_members: '{{ "media_player." + states.input_boolean.lms_player1_sync.name }}'
        target:
          entity_id: "media_player.{{states.input_select.lms_sync_master.state}}"

  # LMS GUI Player_1 Sync Controls - off
  - alias: "LMS GUI Player 1 Sync Controls - OFF"
    initial_state: true
    trigger:
      - platform: state
        entity_id: input_boolean.lms_player1_sync
        to: "off"
    action:
      - service: media_player.unjoin
        data_template:
          entity_id: media_player.{{states.input_boolean.lms_player1_sync.name}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions