I have an interesting problem. I have a sendspin renderer, which works just fine from MA. It’s running ESHome. This lives on top of the kitchen cupboards, in an inaccessible location. I’d like to have a touch interface I can control it with, but that will have to live on a second device.
I’m trying to configure such a second device, but I’m really struggling with the correct incantations. I’ve got volume control working using some lvgl yaml as follows:
- button:
[...]
on_press:
then:
- homeassistant.action:
action: media_player.volume_up
data:
entity_id: media_player.kitchen_audio_kitchen_audio_player
However, this only seems to work for volume control. After some trial and error, I discovered I can start/stop/pause using something like:
- button:
[...]
on_press:
then:
- homeassistant.service:
service: media_player.media_play
data:
entity_id: media_player.kitchen_audio_kitchen_audio_player
I don’t understand why I have to use homeassistant.service here, but I can sync volume using homeassistant.action. Sure, it works, but I like to understand why it works (and why alternatives don’t work).
However, this all works. What has completely evaded me is the ability to skip to the next/previous track, and to select a radio station.
For skipping to previous/next, I’ve tried every possible variation on the working examples for volume and play/pause, substituting variously next, media_next_track, and every other related incantation I can find in any documentation, and nothing seems to have any effect. I can bodge this by using a template switch on the renderer device, exposing this to HA, and triggering this via an action on my controller. This works, but is really hacky and I feel like I shouldn’t need to do this. What am I missing?
For selecting a radio station, I’m using the URI from MA, something like:
- button:
[...]
on_press:
then:
- homeassistant.service:
service: music_assistant.play_media
data:
media_content_id: library://radio/10
entity_id: media_player.kitchen_audio_kitchen_audio_player
enqueue: play
I’ve tried all the things, including:
- Using
homeassistant.actioninstead. - Emptying the queue first using
media_player.clear_playlistfirst (which was ignored) - Using
media_idrather thanmedia_content_id. - Using alternative URIs (different stations, different providers).
- Specifying (or not)
media_type: radio. Also triedmusicandtrack.
In all cases, it’s just completely ignored. I’ve checked the action is being triggered by adding other actions before and after which have observable effect, so it’s not that.
Any suggestions for how I can persuade my ESPHome device to set a radio station playing very welcome - I’ve spent hours on it and I’m at the end of my rope with it.