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.
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: trueExample 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