github jianyu-li/yet-another-media-player v19.0.0
Group Players and Script Variables

latest releases: v35.0.9, v35.0.8, v35.0.7...
10 months ago

New Features

A release so big I bumped it up an extra version number.

  • Group supported players!
  • Pass the currently selected entity to a script!

Group Players

Use the new hamburger menu to bring up a list of supported actions. This will be where future enhancements will live as well.

Preview Image Collapsed

Pass entity to script

A previous limitation to the custom actions is that you could not perform a multi-step process. Now you can pass the current entity_id as a script_variable over to a script. Your script config must use yamp_entity as the variable name.

So now if you want to set the mood, wire up a script to set the lights down low, turn on the fireplace, adjust the volume just right, and play some Barry White.

See examples below:

Example YAML config

type: custom:yet-another-media-player-beta
entities:
  - media_player.office_speaker_airplay
actions:
  - name: test
    icon: mdi:music
    service: script.test_music
    script_variable: true

Example Script

alias: test_music
mode: single
fields:
  yamp_entity:
    description: Target media player
sequence:
  - service: music_assistant.play_media
    data:
      entity_id: "{{ yamp_entity }}"
      media_id: apple_music://playlist/pl.6a236667fbc046a49b48ea9cf4e8b639
      enqueue: replace

Don't miss a new yet-another-media-player release

NewReleases is sending notifications on new releases.