Yes.
If we skip the volume part of your script the script would look something like this:
# Example radio script
radio:
alias: play media on entity
sequence:
- service: media_player.play_media
data_template:
entity_id: "media_player.{{ entity }}"
media_content_id: "{{ content }}"
media_content_type: audio/mp4
And the shortcut buttons, you could use the list shortcuts as well.
# Example shortcuts for script with variables
buttons:
- name: some radio station
type: script
id: radio
data:
entity: chromecast_group
content: http://ic6ti.scahw.com.au/6ppm_128
- name: another radio station
type: script
id: radio
data:
entity: chromecast_group
content: http://streaming.novaentertainment.com.au/nova937
I have been reading through this topic but not found a solution for me or just not seen it.
But i have my homeassistant installed on a ubuntu in a virtual venv with python 3.
I have got lovelace working and with yaml just. then, when i have to use mini-media-player, it says that i have to place it in a folder called /local/ but i dont have a folder called that, unless i go futher back into some more system specific files.
Anybody knows where I should place it when it is not called local?
I know the interface and desktop is on this location when comming from the folder i can go the furthest back to: /home/âuserâ/
Karl, been working away with your latest, thank you!
One thing got me stumped is how to use a entity attribute with conditional cards. Realize this is not a player issue. Similar queston for state-switch. Have you gotten away with this? I get âError in card configuration.â
hmm⊠ok
thats also a problem, because every folder that have something with homeassistant or at least where i enter to go to configuration.yaml, does not have a folder called configâŠ
hmmm⊠ok, my folder where configuration.yaml is, is called â.homeassistantâ. And i have just tried creating a new folder called www in that one and placed the bundle there and in the config folder itself, and changed the directory in the yaml-file. but nothing happened?
When i changed the location path back to local instead of the actual path in the ui-lovelace file and placed the bundle in www in .homeassistant and restartet, it worked
As far as Iâm aware the conditional card does not support template conditions or attributes, only conditions accepted are state === * and/or state !== *, I believe (docs).
You could easily circumvent this by creating a simple template sensor based on the source and then use that template sensor in the condition.
# example of template source sensor
- platform: template
sensors:
spotify_source:
friendly_name: "Spotify Source"
value_template: "{{ states.media_player.spotify.attributes.source }}"
# example conditional card
- type: conditional
conditions:
- entity: media_player.spotify # there's no real `on` state so not `off` & not `unavailable` will do.
state_not: 'off'
- entity: media_player.spotify
state_not: 'unavailable'
- entity: sensor.spotify_source
state: 'desired source'
card:
type: custom:mini-media-player
entity: media_player.spotify
What is state-switch? Iâm not familiar with that.
Iâm using v1.1.0, how can I have the behavior of removed icon_state option?
I use shuffle icon and it was very useful to have the icon color changing with the state of shuffle attribute.
Hey, icon_state is actually not related to this, just poorly named, what icon_state did was changing the color of the entity icon when the entity was playing something.
Hey, progress is now displayed by default (thereâs no show_progress option) if you donât explicitly set progress: true inside the hide object option. Could you try clearing your cache and see if the issue still persists, might be a bug, havenât been able to recreate it yet though.
This is a bug introduced with the latest release, thanks for letting me know, see my response above.
Repeat is not supported by the backend components in HA (at least not yet), and therefore not possible to add to the card, unfortunately.
Okay, this was actually related to the same bug as the icons not showing accent color when active, new version with a fix available in the next few days, hopefully tomorrow.
@ktd@elle2 If you want a fix meanwhile, setting mini-media-player-accent-color: var(--accent-color) in your theme will make the accent color display properly for icons/progress bar.