Wymagania:
mushroom
custom:fold-entity-row
custom:button-card
Kod karty:
type: custom:stack-in-card
mode: vertical
keep:
box_shadow: true
border_radius: true
margin: true
outer_padding: true
background: true
cards:
- type: vertical-stack
cards:
- type: conditional
conditions:
- entity: media_player.pokoj_dzienny
state_not: 'off'
card:
type: custom:mini-media-player
style: |
:host {
--mini-media-player-name-font-weight: 500;
--mini-media-player-artwork-opacity: 1;
--mini-media-player-media-cover-info-color: white;
--mini-media-player-overlay-base-color: #2196f3;
}
entity: media_player.pokoj_dzienny
info: scroll
artwork: cover
volume_stateless: false
toggle_power: true
hide:
runtime_remaining: false
runtime: false
info: false
power: true
power_state: false
progress: false
source: false
play_stop: true
volume_level: false
controls: true
volume: true
icon: true
name: false
- type: conditional
conditions:
- entity: media_player.artur_s_echo_show
state_not: standby
card:
type: custom:mini-media-player
style: |
:host {
--mini-media-player-name-font-weight: 500;
--mini-media-player-artwork-opacity: 1;
--mini-media-player-media-cover-info-color: white;
--mini-media-player-overlay-base-color: #2196f3;
}
entity: media_player.artur_s_echo_show
info: scroll
artwork: cover
volume_stateless: false
toggle_power: true
hide:
runtime_remaining: false
runtime: false
info: false
power: true
power_state: false
progress: false
source: false
play_stop: true
volume_level: false
controls: true
volume: true
icon: true
name: false
- type: conditional
conditions:
- entity: media_player.googlehome4300
state: playing
card:
type: custom:mini-media-player
style: |
:host {
--mini-media-player-name-font-weight: 500;
--mini-media-player-artwork-opacity: 1;
--mini-media-player-media-cover-info-color: white;
--mini-media-player-overlay-base-color: #2196f3;
}
entity: media_player.googlehome4300
info: scroll
artwork: cover
volume_stateless: false
toggle_power: true
hide:
runtime_remaining: false
runtime: false
info: false
power: true
power_state: false
progress: false
source: false
play_stop: true
volume_level: false
controls: true
volume: true
icon: true
name: false
- type: conditional
conditions:
- entity: media_player.artur_s_echo_dot
state: playing
card:
type: custom:mini-media-player
style: |
:host {
--mini-media-player-name-font-weight: 500;
--mini-media-player-artwork-opacity: 1;
--mini-media-player-media-cover-info-color: white;
--mini-media-player-overlay-base-color: #2196f3;
}
entity: media_player.artur_s_echo_dot
info: scroll
artwork: cover
volume_stateless: false
toggle_power: true
hide:
runtime_remaining: false
runtime: false
info: false
power: true
power_state: false
progress: false
source: false
play_stop: true
volume_level: false
controls: true
volume: true
icon: true
name: false
- square: false
columns: 4
type: grid
cards:
- type: custom:mushroom-template-card
style: |
:host {
--primary-text-color:
{% if is_state('input_select.chromecast_radio', 'Lazienka')%} #2196f3
{% else %} #9e9e9e
{% endif %}
}
secondary: ''
icon: mdi:shower-head
entity: media_player.pokoj_dzienny
primary: Łazienka
multiline_secondary: true
icon_color: >-
{{ is_state("input_select.chromecast_radio", "Lazienka") | iif("blue",
"disabled") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Lazienka
target:
entity_id: input_select.chromecast_radio
fill_container: true
hold_action:
action: more-info
layout: vertical
- type: custom:mushroom-template-card
style: |
:host {
--primary-text-color:
{% if is_state('input_select.chromecast_radio', 'Kuchnia')%} #2196f3
{% else %} #9e9e9e
{% endif %}
}
secondary: ''
icon: mdi:silverware-fork-knife
entity: media_player.artur_s_echo_show
primary: Kuchnia
multiline_secondary: true
icon_color: >-
{{ is_state("input_select.chromecast_radio", "Kuchnia") | iif("blue",
"disabled") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Kuchnia
target:
entity_id: input_select.chromecast_radio
fill_container: true
layout: vertical
hold_action:
action: more-info
- type: custom:mushroom-template-card
style: |
:host {
--primary-text-color:
{% if is_state('input_select.chromecast_radio', 'Salon')%} #2196f3
{% else %} #9e9e9e
{% endif %}
}
secondary: ''
icon: mdi:television-classic
entity: media_player.googlehome4300
primary: Salon
multiline_secondary: true
icon_color: >-
{{ is_state("input_select.chromecast_radio", "Salon") | iif("blue",
"disabled") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Salon
target:
entity_id: input_select.chromecast_radio
fill_container: true
layout: vertical
hold_action:
action: more-info
- type: custom:mushroom-template-card
style: |
:host {
--primary-text-color:
{% if is_state('input_select.chromecast_radio', 'Salon Alexa')%} #2196f3
{% else %} #9e9e9e
{% endif %}
}
secondary: ''
icon: mdi:laptop
entity: media_player.artur_s_echo_dot
primary: Salon Alexa
multiline_secondary: true
icon_color: >-
{{ is_state("input_select.chromecast_radio", "Salon Alexa") |
iif("blue", "disabled") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Salon Alexa
target:
entity_id: input_select.chromecast_radio
fill_container: true
layout: vertical
hold_action:
action: more-info
- type: entities
entities:
- type: custom:fold-entity-row
padding: 0
style:
ha-icon:
$: |
ha-svg-icon {
color: #ff5722;
}
head:
type: custom:button-card
name: Polskie Stacje Radiowe
tap_action:
action: none
styles:
card:
- margin-bottom: 0px
- padding-bottom: 0px
- padding-top: 0px
- box-shadow: none
name:
- justify-self: start
- padding-left: 8px
- font-size: 15px
- font-weight: bold
- color: '#795548'
entities:
- type: custom:mushroom-chips-card
card_mod:
style: |
ha-card {
--chip-border-radius: 12px;
--primary-text-color: grey;
}
chips:
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "RMF FM") |
iif("blue", "disabled") }}
content: RMF FM
icon: >-
{{ is_state("input_select.radio_station", "RMF FM") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: RMF FM
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Meloradio") |
iif("blue", "disabled") }}
content: Meloradio
icon: >-
{{ is_state("input_select.radio_station", "Meloradio") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Meloradio
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "RadioZET") |
iif("blue", "disabled") }}
content: RadioZET
icon: >-
{{ is_state("input_select.radio_station", "RadioZET") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: RadioZET
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Eska") |
iif("blue", "disabled") }}
content: Eska
icon: >-
{{ is_state("input_select.radio_station", "Eska") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Eska
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Na Cały Dzień") |
iif("blue", "disabled") }}
content: Na Cały Dzień
icon: >-
{{ is_state("input_select.radio_station", "Na Cały Dzień") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Na Cały Dzień
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "MagicFM") |
iif("blue", "disabled") }}
content: Magic FM
icon: >-
{{ is_state("input_select.radio_station", "MagicFM") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: MagicFM
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Rock Radio") |
iif("blue", "disabled") }}
content: Rock Radio
icon: >-
{{ is_state("input_select.radio_station", "Rock Radio") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Rock Radio
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "RadioMedias") |
iif("blue", "disabled") }}
content: Radio Medias
icon: >-
{{ is_state("input_select.radio_station", "RadioMedias") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: RadioMedias
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "RadioPetrecere") |
iif("blue", "disabled") }}
content: Radio Petrecere
icon: >-
{{ is_state("input_select.radio_station", "RadioPetrecere") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: RadioPetrecere
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Open FM-Bieganie")
| iif("blue", "disabled") }}
content: Open FM-Bieganie
icon: >-
{{ is_state("input_select.radio_station", "Open FM-Bieganie")
| iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Open FM-Bieganie
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Open FM-90`s Hits")
| iif("blue", "disabled") }}
content: Open FM-90`s Hits
icon: >-
{{ is_state("input_select.radio_station", "Open FM-90`s Hits")
| iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Open FM-90`s Hits
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Open FM-Polski
Rock") | iif("blue", "disabled") }}
content: Open FM-Polski Rock
icon: >-
{{ is_state("input_select.radio_station", "Open FM-Polski
Rock") | iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Open FM-Polski Rock
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "Open FM-Praca") |
iif("blue", "disabled") }}
content: Open FM-Praca
icon: >-
{{ is_state("input_select.radio_station", "Open FM-Praca") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: Open FM-Praca
target:
entity_id: input_select.radio_station
alignment: null
- type: entities
entities:
- type: custom:fold-entity-row
padding: 0
style:
ha-icon:
$: |
ha-svg-icon {
color: #ff5722;
}
head:
type: custom:button-card
name: Lokalne
tap_action:
action: none
styles:
card:
- margin-bottom: 0px
- padding-bottom: 0px
- padding-top: 0px
- box-shadow: none
name:
- justify-self: start
- padding-left: 8px
- font-size: 15px
- font-weight: bold
- color: '#795548'
entities:
- type: custom:mushroom-chips-card
card_mod:
style: |
ha-card {
--chip-border-radius: 12px;
--primary-text-color: grey;
}
chips:
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "P1") | iif("blue",
"disabled") }}
content: P1
icon: >-
{{ is_state("input_select.radio_station", "P1") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: P1
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "P2") | iif("blue",
"disabled") }}
content: P2
icon: >-
{{ is_state("input_select.radio_station", "P2") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: P2
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "P3") | iif("blue",
"disabled") }}
content: P3
icon: >-
{{ is_state("input_select.radio_station", "P3") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: P3
target:
entity_id: input_select.radio_station
- type: template
entity: input_select.radio_station
icon_color: >-
{{ is_state("input_select.radio_station", "P4") | iif("blue",
"disabled") }}
content: P4
icon: >-
{{ is_state("input_select.radio_station", "P4") |
iif("mdi:checkbox-blank-circle",
"mdi:checkbox-blank-circle-outline") }}
tap_action:
action: call-service
service: input_select.select_option
service_data:
option: P4
target:
entity_id: input_select.radio_station
- type: custom:mushroom-chips-card
chips:
- type: action
icon_color: blue
icon: mdi:play
tap_action:
action: call-service
service: script.radio
service_data: {}
target: {}
- type: action
icon_color: deep-orange
icon: mdi:stop
tap_action:
action: call-service
service: script.radiostop
service_data: {}
target: {}
- type: action
tap_action:
action: call-service
service: input_number.decrement
service_data: {}
target:
entity_id: input_number.volume_radio
icon: mdi:volume-minus
icon_color: grey
- type: template
card_mod: null
content: >-
{{ state_attr('media_player.googlehome4300', 'volume_level') |
round(2,default="0") }}
style: |
ha-card {
box-shadow: 0px 0px;
}
- type: action
icon: mdi:volume-plus
tap_action:
action: call-service
service: input_number.increment
service_data: {}
target:
entity_id: input_number.volume_radio
icon_color: grey
- type: custom:mushroom-entity-card
entity: input_number.volume_radio
- type: custom:my-slider
entity: input_number.volume_radio
height: 20px
mainSliderColor: '#7dbde8'
secondarySliderColor: '#f2590c'
thumbWidth: 5px
thumbHeight: 30px
thumbColor: black
thumbHorizontalPadding: 0px
thumbVerticalPadding: 0px
Kod w sekcji package
do obsługi Radia:
https://pastebin.com/hN7XPjUF