Im trying to via a input_text: Helper to insert an url in to this line
media_content_id: “{{ states(‘input_text.radio1_url’) }}”
But it will not take the url, i am also using it in another place in the configuration where it is not a problem
type: horizontal-stack
cards:
- type: custom:mushroom-template-card
entity: media_player.living_room_speaker
tap_action:
action: call-service
service: media_player.play_media
data:
entity_id: media_player.living_room_speaker
media_content_id: >
{{ input_text.radio1_url }}
media_content_type: music
icon: mdi:speaker
primary: '{{ states(''input_text.radio1_name'') }}'
layout: vertical
picture: '{{ states(''input_text.radio1_image'') }}'
card_mod:
style: |
ha-card {
{% if state_attr('media_player.living_room_speaker', 'media_content_id') == states('input_text.radio1_url') %}
{% if states('media_player.living_room_speaker') == 'playing' %}
background-color: #002f7a;
filter: none;
{% elif states('media_player.living_room_speaker') == 'buffering' %}
background-color: yellow;
filter: none;
{% else %}
background-color: gray;
filter: grayscale(100%);
{% endif %}
{% endif %}
}