Home Assistant Community

Custom UI: Mini media player

#1

preview

Beta-release, please report bugs and tell me what to improve.
Check config for setup info (media_player.mini is my real player)

known issues:

  • CSS fixes for too long text

cache issues?
clear browser cache, on Chrome mobile: settings -> Privacy -> Clear browsing data

https://github.com/c727/home-assistant-mini-media-player

20 Likes

Flatten media player(s) into a group card
Custom UI: Mini video player (HACK)
Chromecast Radio with station and player selection
Lovelace: Mini Media Player
#2

Looks nice. Is that google mini your referring too? Would be nice for all media players

0 Likes

#4

Oh Nice! thanks, Ill try it out and let you know. I use sonos btw

0 Likes

#5

I’ve been meaning to do something exactly like this! Thank you so much, this is great! I’ll report back if I run into any issues.

0 Likes

#6

Hmm, not working for me.

homeassistant:
  name: Home
  latitude: !secret home_lat
  longitude: !secret home_lon
  elevation: 391
  unit_system: imperial
  time_zone: America/Chicago
  customize:
    input_text.dummy_office_home:
      icon: mdi:cast
      custom_ui_state_card: state-card-mini-media-player
      config:
        player: media_player.office_home
frontend:
  javascript_version: latest
  extra_html_url:
    - /local/custom_ui/state-card-mini-media-player.html
input_text:
  dummy_office_home:
    name: Office Home

Still have the standard state card and the Input Text card is blank. Copied state card .html to www/custom_ui

Running hass.io 0.60 on a RPi3

0 Likes

#8

ctrl+f5 had it popup. derp. thanks. this is excellent

0 Likes

#9

Looking into adding some RESTful Sensors using the local Google Home API now: https://rithvikvibhu.github.io/GHLocalApi/#device-settings-set-device-options-post

0 Likes

#10

This is ace, thank you!

Just wish you’d done it a week ago, would have saved me an hour of coding template switches I no longer need :joy::joy:

0 Likes

#11

Do you have to hit ctrl+f5 when switching between panels and tabs? It also seems to not work on iOS browsers :frowning:

0 Likes

#12

I’m having the same issue here - every time I switch to a new tab I have to ctrl-f5 to get it to show.

@eddi89 ?

Also, it’s not applying the icons and friendly names for me, and is pulling mdi:cast icon from somewhere (presumably it’s a HA default??), even though I’ve set them to mdi:play - interestingly the player that I have currently disconnected is applying the name and icon :confused:

media_player

(note no capitalisation on Boys and Bedroom)

    input_text.media_boys:
      icon: mdi:play
      custom_ui_state_card: state-card-mini-media-player
      config:
        player: media_player.boys

    input_text.media_girls:
      icon: mdi:play
      custom_ui_state_card: state-card-mini-media-player
      config:
        player: media_player.girls

    input_text.media_bedroom:
      icon: mdi:play
      custom_ui_state_card: state-card-mini-media-player
      config:
        player: media_player.bedroom

#####################
input_text:
  media_boys:
    name: Boys

  media_girls:
    name: Girls

  media_bedroom:
    name: Bedroom
0 Likes

#13

…and a quick suggestion, if I may (for when you iron the bugs out :stuck_out_tongue: )

On the standard HA interface when you click on the media player it gives you a text-to-speech box - could this do that too?

0 Likes

#15

Disabling cache works for one tab, but I have these on multiple tabs and it does not work. Which ever tab I hit ctrl + f5 on will stick.

0 Likes

#18

I’ve tried clearing the cache before I posted. Haven’t had a chance to look at disabling the cache, but it looks like the opposite problem almost, as in its not caching it when it should be so you have to reload the page to get it.

Let’s say I have 3 tabs and one of these on each. I restart HA and none of them are there. I’m on tab 1 and I refresh, the one on tab 1 appears, go to tab 2 or 3 and they’re still missing, but if I go back to tab 1 it’s still there.

So I go to tab 2 and refresh, tab 2’s one appears, but tab 1’s is now gone.

1 Like

#19

Same observations here

1 Like

#20

In fact, just to add, they’re not appearing on my phone at all, just the desktop.

Your custom_ui_tiles continue to work perfectly FYI :+1:

0 Likes

#22

OK, done on phone (definitely as I had to log back in), no change, still not appearing, just an empty card.

Will have to wait to update you on the laptop, cheers :+1:

0 Likes

#24

OK - I have:

  • deleted the old files and commented out the media player
  • rebooted HA
  • cleared the cache and local storage/session storage on my laptop and phone
  • added the new custom_ui files you updated on your github page for standard and es5
  • un-commented the media players
  • restarted HA

Problem persists as before, except now I can see them on my phone, but the behaviour on phone and laptop is identical, I can only have these on one tab at a time for some reason :cry:

[edit] and clicking on them does not give me a TTS option FYI :+1:

0 Likes

#25

@eddi89 - any further ideas on this issue a couple of us are having?

Happy to grab any information you need from my system if you tell me what you need (and possibly how to obtain it)

Tiles work perfectly, media centres have to be refreshed each time you need them to show on a different tab from the one you last refreshed.

Thanks in advance :+1:

0 Likes

#26

Thanks for a great project. @eddi89

I have done all my speakers 2 of BOSE Soundtouch 10, Google Home and 2 Google Mini.
and of course the spotify media player.

HA%20ScreenShot_20180128171006

I was wondering if you can put into the popup that has the playlist buttons on the Spotify player the source select.

And not sure why this works with the BOSE speakers but not the Google home.

http://media-ice.musicradio.com/ClassicFMMP3

Thanks again.

2 Likes

#28

Safari requires me to manually refresh the page to see the players (even then the players appear only sometimes). On the iPhone, the players never appear.

0 Likes