Media skip

Quick one for you geniuses:
How do I add skip forward and skip backwards buttons to the media_player widget in hadashboard?

if they are not there then probably not easy.
i guess in that case you need to change the widget javascript.

Thanks. So it is basically a question of wether the particulat physical media player and it’s ha-script supports the function ?

if the physical device or the ha component dont support the options, then dashboard cant support it at all.
if it is in HA then in theory it can always be in the dashboard. (some things easy, some things very hard, but possible)

I use the Spotify media player. It supports track skip in HA. Any idea how to view the buttons in hadash?

So, the Spotify media player has skip forward/backward and pause/play buttons i HA. Anyone knows how to somehow include these thre buttons as widgets or anyhow include them in the hadashboard?

My media players come up with those buttons automatically, I’m not sure why yours don’t, can we see your code (obviously in code blocks)?

make the widget bigger? Try (3x3) or so

Progress, At last. The buttons gets visible when notusing a skin.
image

Not when the clear_sky skin is activated. Any ideaas? edit the css for the skin?image

in the variables.yaml from the skin probably some variables are missing.
compare the mediaplayer variables from the default skin with the variables.yaml from the skin you use.

1 Like

Thanks!

If I wanted to set up a scrip calling the, let´s say “skip to nex track”, using the info from the ‘Services’ in HA that could be called by a widget in hadash, would this involve anything els than adding a few lines in scrips.yamel. In that case, what would it be? (see screenshot)

why would you like to make a script for that?
if you add the needed variables, your buttons wil show up.

Directly in the dash.yamel file? What would be the apropriale entity and variables? How do I set it up?

BTW. Thanks!

you use a skin, right?
then you need to find the variables.yaml from your skin

also you need to find the variables.yaml from the default skin.
then you look which variables your skin file is missing.

if you cant find the default skin on your own device, you can also find the variables.yaml online here:

1 Like

Thanks! This will let me edit the styles of the skin, right? But how do I get the skip forwart button as aa widgit using the data from services in HA?

the button is probably already there, just not visible because you dont have any value for that part in the skin.

if you dont add the variables to your skin you will NEVER see the buttons.

try to view your dashboard without a skin. you will probably see the buttons you want then.

All the widgets are defined in my dash.yamel file. At the end of the dash.yaml file I define where to place the widgets an the size.

For example:

media_player:
widget_type: media_player
entity: media_player.spotify
title: Spotify

and

layout:

  • utetemperatur(2x2), innetemperatur(2x2), spacer, clock(3x1)
  • spacer, media_player(3x2)
  • barom(1x1), fuktighet(1x1), co2(1x1), fukt_inne(1x1)
  • reload(1x1), spacer, spacer, spacer, spacer, your_media_select(3x1)
  • lys_ute_veranda (1x1), bod_utelys(1x1), bod_innelys(1x1), lys_gang(1x1), lys_kjokken(1x1), your_speaker (3x1)

To get the skip-buttons on the dashboard, I suppose the will have to be defined in the dsah.yamel file? Right?
So my questin is: How do I place the “Next track” widgit on the dashboard, based on the information in the Services page i HA (as in the screenshot above)?

Excuse my bad explanation. Apreciate the help!

NO!!!

PLEASE view your dashboard WITHOUT using a skin!!!

so no ?skin=anything in your url

I get it. Viewing the dashboard without skin will give the prev./pause-play/skip buttons in the media_player widget. This is however not the objective. I´m not gonna use the media_player widget.
The objective is to have three separate widgets with the ‘pevious’, ‘play/pause’ and ‘skip’.

oke, thats possible but you need to create scripts or automations in home assistant for that.
if you have that created in home assistant, you can use the script widget or an switch widget to activate those things in your dashboard.

i cannot help you creating scripts or automations in home assistant, because i dont use those.
i would suggest you read up on how to create automations and/or scripts in the home assistant documentation for that.

so for what you want:

  1. create a script in home assistant
  2. add a script widget to your dashboard.