New widgets: media source select, climate operation mode select and media player with volume slider

volume_level: 0.6699999999999999
is_volume_muted: false
source: Shield
source_list: AUDIO1,Blue-ray,Guest room speaker,HDMI5,NET RADIO,PS4PRO,SERVER,Server,Shield,Spotify,TUNER,USB,V-AUX,iPod (USB)
friendly_name: Yamaha
supported_features: 18828
custom_ui_state_card: state-card-custom-ui

These are only the attributes. I still miss the status in your screenshot

it’s on (or off), as I wrote you before.

I have two AVR (yamaha and Marantz), both same (on or off but icon still gray)

I just checked with my Yamaha AVR ( RX-V481). When I watch TV and listen via HDMI to the TV-Sound the media_player state will switch from “off” to “on”.
When I stream a net radio station the state goes to “playing”.

I used this config in my dashboard and everything worked fine:

yamaha_receiver:
    widget_type: media_with_volume
    title: Yamaha
    entity: media_player.yamaha_receiver
    icon_on: mdi-speaker
    icon_off: mdi-speaker-off
    step: 3
    active_map:
        - playing
        - paused
        - idle

I’am afraid that I can not find out your problem this way :anguished:

I will check this. But yours when it’s ON (not PLAYING) the icon is gray?

Just to clarify in off the icon is gray with a line on top. In on is gray without the line

and the icon stays gray?

No it switches to green.
A question: did you put the file variables.yaml in the folder custom_css/default ?

If you did you should also copy the file dashboard.css from the appdaemon-folder to the folder custom_css/default

Besides the color problem with the widget does it work properly ?

no I don’t have the folder custom_css at all. I am in HASSIO I do not have access to variables.yaml or dashboard.css for the default skin

Yes the widget seems working fine.

EDIT

putting the two file it works, just the green is a very dark green, not like the green shown in your webpage, I wish is the same green used in the presence detection.

DO you know the colour code? And how to change it?

The color code is #aaff00.

Normally you have to copy also the file variables.yaml from the appdaemon folder and add the content of my variables.yaml to it:

 #Custom Variables.yaml for Default Theme

#Add this entry to your custom css settings

media_select_title_style: $style_title
media_select_title2_style: $style_title2
media_select_widget_style: $background_style
media_select_select_style: “background-color: #999;color:black”
media_select_container_style: “”

climate_select_title_style: $style_title
climate_select_title2_style: $style_title2
climate_select_widget_style: $background_style
climate_select_select_style: “background-color: #999;color:black”
climate_select_container_style: “”

media_with_volume_icon_on: mdi-lightbulb
media_with_volume_icon_off: mdi-lightbulb
media_with_volume_title_style: $style_title
media_with_volume_title2_style: $style_title2
media_with_volume_slider_style: “”
media_with_volume_widget_style: $background_style
media_with_volume_icon_style_active: $style_active
media_with_volume_icon_style_inactive: $style_inactive

yes, this I did

Try adding this to your widget:

icon_style_active: “color: #aaff00”

All good, I forgot to take out color: green. Now colour is perfect.

Do you use your widget on chromecast? Is it needed the ON OFF on a chromecast?

Sorry but I have no chromcast and therefore I honestly do not know

Hi there,

thx for sharing all these Informations.
By the way. I didint found teh soloution to integreat the cover and also the current title/track etc.
in my Dashbaord.

  • Selecting Playlist and Starting/Paused my Sonos MediaPlayer works perfect

Anyone who can help me?

The current track is par of the standard media_player widget which came with appdaemon.
The cover in appdaemon is actually done with the iframe widget which comes also with appdaemon.
You need an url of the cover to pass as img to the iframe widget.

Works perfect - but now i got a new Problem.
The Playlist also works but starts with the first entry… That is a Problem because if i load my sonos.dash file
all mediaplayers starts to run with the playlist entry. Is there any Options to get a Value like “Select Playlist”

I found something like that:
https://community.home-assistant.io/t/new-widgets-media-source-select-climate-operation-mode-select-and-media-player-with-volume-slider/40263/20?u=jens.niehues

I have used an input_select and a script in order to do this. The input_select defines which playlist to select and the script is started with a dashboard widget_type: script.

@gcosta74 Sorry to bother you, but wondering if you can help. I have Mopidy setup and have it setup as a MPD in HA.

media_player:
- alias: 'Music Pi'
  platform: mpd
  name: 'Music Pi'
  host: 192.168.1.xxx

But when I add it to my dashboard, its seems to really quickly pull up the playlist’s as source select, but then they disappear before I can select them. Also same problem as Darbos above as well. If i manually start playing something on the mopidy interface, it plays for a few seconds, then stops, and switches off the media player.

My dashboard setup is

your_media_select:
  widget_type: media_select
  entity: media_player.music_pi
  title: Kitchen Source
  title2: Your Subtitle

Any help would be very much appreciated, thank you in advance.

@gcosta74,

I am trying to add your climate_select widget to my Dashboard however after adding the files to my custom_widgets folder and adding this setup in my dash file it isn’t showing up in my Dashboard. To be honest I wasn’t quite sure what to do with the variables.yaml file and did not add it any where. This could be the missing piece I need but was unsure where it should go. Any ideas on how I can get this to appear?

Thanks!

thermostat1:
    widget_type: climate_select
    entity: climate.second_floor_thermostat_ct101_cooling_1
    title: 2nd Floor
    title2: Thermostat