language: "en"
intents:
  MutePlayer:
    data:
      - sentences:
          - "({mute_or_unmute};<media_player>)"
            
  MutePlayerArea:
    data:
      - sentences:
          - "{mute_or_unmute}"
        requires_context:
          area:
            slot: true
            
  ShuffleSet:
    data:
      - sentences:
          - "(set|change) <media_player> shuffle [mode ]to {shuffle_mode}"
                      
  ShuffleSetArea:
    data:
      - sentences:
          - "(set|change) shuffle [mode ]to {shuffle_mode}"
        requires_context:
          area:
            slot: true
                      
  RepeatSet:
    data:
      - sentences:
          - "(set|change) <media_player> repeat [mode ]to {repeat_mode}"
          
  RepeatSetArea:
    data:
      - sentences:
          - "(set|change) repeat [mode ]to {repeat_mode}"
        requires_context:
          area:
            slot: true
          
  ClearQueue:
    data:
      - sentences:
          - "Clear <media_player> (queue|cue|Q|cube)"

  ClearQueueArea:
    data:
      - sentences:
          - "Clear the (queue|cue|Q|cube)"
        requires_context:
          area:
            slot: true

  PlayerStop:
    data:
      - sentences:
          - "(Stop;<media_player>)"
          
  PlayerStopArea:
    data:
      - sentences:
          - "Stop"
        requires_context:
          area:
            slot: true
          
  SelectSource:
    data:
      - sentences:
          - "Set <media_player> source to {desired_source}"
          
  PlayerJoin:
    data:
      - sentences:
          - "(Join|connect) <media_player> to [the ]{media_player_group}"

  PlayerUnjoin:
    data:
      - sentences:
          - "(Unjoin|disconnect|remove) <media_player>"

expansion_rules:
  media_player: "[the ]{media_player}"
          
lists:
  media_player:
    values:
      - in: "Orphne"
        out: "media_player.squeezeplay_00_87_1c_e7_3a_3c"
      - in: "Living Room Receiver"
        out: "media_player.lvr_receiver"
      - in: "Rumpus TV"
        out: "media_player.ma_rumpus_tv"
      - in: "Rumpus Amplifier"
        out: "media_player.ma_rumpus_amplifier"
      - in: "Study (Player|Speaker)"
        out: "media_player.ma_picoreplayer"
      - in: "Google Speaker Group"
        out: "media_player.ma_google_speaker_group_2"
      - in: "TV [player]"
        out: "media_player.ma_sony_xr_55x90k_3"
        
  media_player_group:
    values:
      - in: "Rumpus TV"
        out: "media_player.ma_rumpus_tv"
      - in: "Rumpus Amplifier"
        out: "media_player.ma_rumpus_amplifier"
      - in: "Study Player"
        out: "media_player.ma_picoreplayer"
      - in: "TV [player]"
        out: "media_player.ma_sony_xr_55x90k_3"
        
  volume:
    range:
      from: 0
      to: 100

  repeat_mode:
    values:
      - "off"
      - "all"
      - "one"
      
  shuffle_mode:
    values:
      - in: "(on|shuffle)"
        out: "true"
      - in: "off"
        out: "false" 

  mute_or_unmute:
    values:
      - in: "mute"
        out: "true"
      - in: "unmute"
        out: "false"
  
  desired_source:
    wildcard: true