Could you provide example of configuration.yaml with mediaplayer config for linkplay (wiim)

LaruX

New member
Joined
Dec 30, 2024
Messages
3
Hello!
I was active in home automation 10 years ago and am now back. I have moved from commercial solutions to opensource software and there is a lot of tinkering going on.
The HASS platform I use is Home assistant and I am currently practicing the principles of its operation.
I'm not happy with the basic configuration of the media player, I'd like to customize it and most obviously that needs to be done in the configuration.yaml file.
The code examples have given a bit of direction, but there are no actual examples in the linkplay documentation. Could someone here help and share their own linkplay mediaplayer customization so that I can get access to the presets, among other things.
Many thanks.
ps. i am a proud owner of a Wiim Ultra media player. It's a cool gadget!
 
The default linkplay integration is set up in the interface, not in configuration.yaml. If you want to play a preset that can also be done in the interface for automation editor or script editor, or on the developer tools interface. Then you can view the yaml for that action. For example, go to developer tools -> actions -> choose linkplay: play preset. Choose a target and a preset number, and then click "go to yaml mode" and you'll get something like this:
Code:
action: linkplay.play_preset
metadata: {}
data:
  preset_number: 2
target:
  entity_id: media_player.basement_wiim
You can remove the metadata line if you're writing your own automation using yaml
 
Thanks. I would like to have preset buttons in media player. How it can be done?
I got buttons (outside of media player) by using "button widget"

Not bad at all.. I found presets as actions, which is pretty nice. Great!

YAML code:

"show_name: true
show_icon: true
type: button
tap_action:
action: perform-action
perform_action: linkplay.play_preset
target:
device_id: 9ccc111f39ead125c07223b088cca6d5
data:
preset_number: 2
entity: media_player.olohuone_aani_wiim_ultra_3
show_state: true
icon: mdi:radio
name: YLESUOMI"
 
Back
Top