Hereās a general version of my room card, in the swipe card I included a media card as well as a stack card which can include lights, locks or other entities. As each room is different I tried to include one of each of the different cards or chips I use.
Room Card
type: custom:vertical-stack-in-card
cards:
- type: custom:swipe-card
parameters:
spaceBetween: 8
cards:
- type: custom:mushroom-template-card
primary: Family Room
secondary: '{{ states(''sensor.family_room_temperature'') }} Ā°F'
icon: mdi:coffee
layout: horizontal
entity: light.family_room
tap_action:
action: navigate
navigation_path: family_room
hold_action:
action: none
double_tap_action:
action: toggle
picture: >-
{% if is_state('media_player.family_room','playing') %}
{{ states.media_player.family_room.attributes.entity_picture }}
{% else %} {% endif %}
card_mod:
style:
mushroom-shape-avatar$: |
.picture {
{% if is_state('media_player.family_room','playing') %}
animation: rotation 4s linear infinite;
{% else %} {% endif %}
}
@keyframes rotation {
100% {
transform: rotate(360deg);
}
}
mushroom-shape-icon$: |
.shape {
{% set r = state_attr(config.entity, 'rgb_color')[0] %}
{% set g = state_attr(config.entity, 'rgb_color')[1] %}
{% set b = state_attr(config.entity, 'rgb_color')[2] %}
{% if is_state(config.entity, 'on') %}
--icon-color: rgb( {{r}}, {{g}}, {{b}} ) !important;
--shape-color: rgba( {{r}}, {{g}}, {{b}}, 0.2 ) !important;
{% endif %}
}
.: |
ha-card {
border-radius: 16px 16px 0px 0px;
}
- type: custom:mushroom-media-player-card
entity: media_player.family_room
use_media_artwork: true
use_media_info: true
collapsible_controls: true
show_volume_level: false
fill_container: false
tap_action:
action: call-service
service: media_player.media_play_pause
data: {}
target:
entity_id: media_player.family_room
card_mod:
style: |
ha-card {
border-radius: 16px 16px 0px 0px;
{% if is_state(config.entity, 'playing') or is_state(config.entity, 'paused') %}
background: rgba(var(--rgb-card-background-color), 0.9) url( '{{ state_attr(config.entity, "entity_picture" ) }}' ) center no-repeat;
background-size: cover;
background-blend-mode: overlay;
{% else %}
{% endif %}
}
- type: conditional
conditions:
- entity: sensor.ps5_activity
state: playing
card:
type: custom:button-card
styles:
card:
- width: 242px
- height: 66px
card_mod:
style: |
ha-card {
border-radius: 18px 18px 0px 0px;
background-image: url( '{{ state_attr( "sensor.ps5_activity", "title_image" ) }}' );
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
background-blend-mode: overlay;
background-color: rgba(25,25,25,0.3);
}
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: ''
layout: vertical
icon: |-
{% if is_state(config.entity, "locked") %}
mdi:lock
{% else %}
mdi:lock-open
{% endif%}
entity: lock.kitchen_door
icon_color: |-
{% if is_state(config.entity, "locked") %}
green
{% else %}
red
{% endif%}
tap_action:
action: toggle
card_mod:
style: |
ha-card {
{% if is_state(config.entity,'locked') %}
background: rgba(var(--rgb-light-green),0.2);
{% else %}
background: rgba(var(--rgb-light-red),0.2);
{% endif %}
}
- type: custom:mushroom-light-card
entity: light.patio_strip_lights
layout: vertical
primary_info: none
secondary_info: none
card_mod:
style: |
ha-card {
{% if is_state(config.entity, 'on') %}
background: rgba(var(--rgb-light-amber),0.1);
{% else %}
background: transparent;
{% endif %}
}
card_mod:
style: |
ha-card {
border-radius: 16px 16px 0px 0px;
}
- type: custom:mushroom-chips-card
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
}
alignment: end
chips:
- type: conditional
conditions:
- entity: light.the_flamingo
state: 'on'
chip:
type: template
icon_color: |-
{% set state=states(entity) %}
{% if state=='on' %}
pink
{%else%}
grey
{%endif%}
entity: light.the_flamingo
icon: mdi:bird
tap_action:
action: toggle
- type: conditional
conditions:
- entity: light.local_lamp
state: 'on'
chip:
type: light
entity: light.local_lamp
content_info: none
use_light_color: true
icon: mdi:lamp
- type: conditional
conditions:
- entity: lock.kitchen_door
state: unlocked
chip:
type: template
icon_color: red
icon: mdi:lock-open
tap_action:
action: call-service
service: lock.lock
data: {}
target:
entity_id: lock.kitchen_door
- type: conditional
conditions:
- entity: binary_sensor.kitchen_door_alarm_sensor
state: 'on'
chip:
type: template
icon_color: red
icon: mdi:door-open
card_mod:
style: |
ha-card {
height: 102px;
{% if is_state('light.family_room', 'on') %}
background: rgba({{ state_attr('light.family_room','rgb_color') [0] }},
{{ state_attr('light.family_room','rgb_color') [1] }},
{{ state_attr('light.family_room','rgb_color') [2] }},0.1);
{% endif %}
}
I also wanted to include some of the other cards I use on my dashboards
Full Color Light Card
Light Card
type: custom:mushroom-light-card
name: Lamp
entity: light.local_lamp
icon: mdi:lamp
use_light_color: true
show_brightness_control: true
show_color_control: true
show_color_temp_control: true
collapsible_controls: false
card_mod:
style: |
ha-card {
{% set r = state_attr(config.entity, 'rgb_color')[0] %}
{% set g = state_attr(config.entity, 'rgb_color')[1] %}
{% set b = state_attr(config.entity, 'rgb_color')[2] %}
{% if is_state(config.entity, 'on') %}
background: rgba({{r}}, {{g}}, {{b}},0.1);
--primary-text-color: rgb({{r}}, {{g}}, {{b}});
--secondary-text-color: rgba({{r}}, {{g}}, {{b}},0.5);
{% endif %}
}
Dynamic Color Temp Card
Temp Card
type: custom:mushroom-template-card
primary: Kitchen
secondary: '{{ states(entity) }}Ā°F'
entity: sensor.kitchen_temperature
icon: mdi:thermometer
layout: horizontal
tap_action:
action: more-info
icon_color: |
{% set battery_level = states(entity) %}
{% if battery_level < '63' %}
blue
{% elif battery_level < '65' %}
teal
{% elif battery_level < '67' %}
green
{% elif battery_level < '69' %}
light-green
{% elif battery_level < '71' %}
lime
{% elif battery_level < '72' %}
yellow
{% elif battery_level < '74' %}
amber
{% elif battery_level < '78' %}
orange
{% elif battery_level < '82' %}
deep-orange
{% else %}
red
{% endif %}
card_mod:
style: |
ha-card {
{% set battery_level = states(config.entity) %}
{% if battery_level < '63' %}
--primary-text-color: rgb(var(--rgb-blue));
--secondary-text-color: rgba(var(--rgb-blue),0.5);
background: rgba(var(--rgb-blue),0.1);
{% elif battery_level < '65' %}
--primary-text-color: rgb(var(--rgb-teal));
--secondary-text-color: rgba(var(--rgb-teal),0.5);
background: rgba(var(--rgb-teal),0.1);
{% elif battery_level < '67' %}
--primary-text-color: rgb(var(--rgb-green));
--secondary-text-color: rgba(var(--rgb-green),0.5);
background: rgba(var(--rgb-green),0.1);
{% elif battery_level < '71' %}
--primary-text-color: rgb(var(--rgb-lime));
--secondary-text-color: rgba(var(--rgb-lime),0.5);
background: rgba(var(--rgb-lime),0.1);
{% elif battery_level < '72' %}
--primary-text-color: rgb(var(--rgb-yellow));
--secondary-text-color: rgba(var(--rgb-yellow),0.5);
background: rgba(var(--rgb-yellow),0.1);
{% elif battery_level < '74' %}
--primary-text-color: rgb(var(--rgb-amber));
--secondary-text-color: rgba(var(--rgb-amber),0.5);
background: rgba(var(--rgb-amber),0.1);
{% elif battery_level < '78' %}
--primary-text-color: rgb(var(--rgb-orange));
--secondary-text-color: rgba(var(--rgb-orange),0.5);
background: rgba(var(--rgb-orange),0.1);
{% elif battery_level < '82' %}
--primary-text-color: rgb(var(--rgb-deep-orange));
--secondary-text-color: rgba(var(--rgb-deep-orange),0.5);
background: rgba(var(--rgb-deep-orange),0.1);
{% else %}
--primary-text-color: rgb(var(--rgb-red));
--secondary-text-color: rgba(var(--rgb-red),0.5);
background: rgba(var(--rgb-red),0.1);
{% endif %}
}
Decluttering Card
temp_card:
card:
type: custom:mushroom-template-card
primary: '[[name]]'
entity: '[[entity]]'
secondary: '{{ states(entity) }}Ā°F'
icon: mdi:thermometer
layout: horizontal
tap_action:
action: more-info
icon_color: |
{% set battery_level = states(entity) %}
{% if battery_level < '63' %}
blue
{% elif battery_level < '65' %}
teal
{% elif battery_level < '67' %}
green
{% elif battery_level < '69' %}
light-green
{% elif battery_level < '71' %}
lime
{% elif battery_level < '72' %}
yellow
{% elif battery_level < '74' %}
amber
{% elif battery_level < '78' %}
orange
{% elif battery_level < '84' %}
deep-orange
{% else %}
red
{% endif %}
card_mod:
style: |
ha-card {
{% set battery_level = states(config.entity) %}
{% if battery_level < '63' %}
--primary-text-color: rgb(var(--rgb-blue));
--secondary-text-color: rgba(var(--rgb-blue),0.5);
background: rgba(var(--rgb-blue),0.1);
{% elif battery_level < '65' %}
--primary-text-color: rgb(var(--rgb-teal));
--secondary-text-color: rgba(var(--rgb-teal),0.5);
background: rgba(var(--rgb-teal),0.1);
{% elif battery_level < '67' %}
--primary-text-color: rgb(var(--rgb-green));
--secondary-text-color: rgba(var(--rgb-green),0.5);
background: rgba(var(--rgb-green),0.1);
{% elif battery_level < '69' %}
--primary-text-color: rgb(var(--rgb-light-green));
--secondary-text-color: rgba(var(--rgb-light-green),0.5);
background: rgba(var(--rgb-light-green),0.1);
{% elif battery_level < '71' %}
--primary-text-color: rgb(var(--rgb-lime));
--secondary-text-color: rgba(var(--rgb-lime),0.5);
background: rgba(var(--rgb-lime),0.1);
{% elif battery_level < '72' %}
--primary-text-color: rgb(var(--rgb-yellow));
--secondary-text-color: rgba(var(--rgb-yellow),0.5);
background: rgba(var(--rgb-yellow),0.1);
{% elif battery_level < '74' %}
--primary-text-color: rgb(var(--rgb-amber));
--secondary-text-color: rgba(var(--rgb-amber),0.5);
background: rgba(var(--rgb-amber),0.1);
{% elif battery_level < '78' %}
--primary-text-color: rgb(var(--rgb-orange));
--secondary-text-color: rgba(var(--rgb-orange),0.5);
background: rgba(var(--rgb-orange),0.1);
{% elif battery_level < '84' %}
--primary-text-color: rgb(var(--rgb-deep-orange));
--secondary-text-color: rgba(var(--rgb-deep-orange),0.5);
background: rgba(var(--rgb-deep-orange),0.1);
{% else %}
--primary-text-color: rgb(var(--rgb-red));
--secondary-text-color: rgba(var(--rgb-red),0.5);
background: rgba(var(--rgb-red),0.1);
{% endif %}
}
Minimalist Style Graph Card
Graph Card
type: custom:stack-in-card
cards:
- type: custom:mushroom-entity-card
entity: sensor.processor_use_percent
primary_info: state
secondary_info: name
name: CPU Usage
icon_color: disabled
- type: custom:mini-graph-card
entities:
- entity: sensor.processor_use_percent
name: CPU Usage
color: '#2196f3'
y_axis: secondary
hours_to_show: 6
points_per_hour: 20
line_width: 3
font_size: 50
animate: true
show:
name: false
icon: false
state: false
legend: false
fill: fade
card_mod:
style: |
ha-card {
margin-top: -15px;
}