Last active
March 21, 2024 11:46
-
-
Save Leen15/ae0e009858d5bd0bbfaa70a07a452ba1 to your computer and use it in GitHub Desktop.
Cucina card template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: custom:mod-card | |
style: | |
.: | | |
ha-card { | |
background: var(--ha-card-background, var(--card-background-color, #fff)); | |
} | |
hui-vertical-stack-card: | |
$: | |
.: | | |
#root { | |
gap: 0px !important; | |
} | |
card: | |
type: vertical-stack | |
cards: | |
- type: horizontal-stack | |
cards: | |
- type: custom:mushroom-template-card | |
primary: Cucina | |
icon: mdi:food | |
entity: light.a32_light_5 | |
icon_color: >- | |
{% if is_state('light.gruppo_luci_cucina','on') %} orange {% endif | |
%} | |
tap_action: | |
action: navigate | |
navigation_path: '#cucina' | |
double_tap_action: | |
action: call-service | |
service: light.turn_off | |
target: | |
area_id: cucina | |
data: {} | |
card_mod: | |
style: | | |
ha-card { | |
padding-top: 5px !important; | |
padding-bottom: 0px !important; | |
box-shadow: none; | |
} | |
- type: custom:mushroom-chips-card | |
chips: | |
- type: template | |
entity: climate.clima_soggiorno | |
content: >- | |
{{ state_attr("climate.clima_soggiorno", "current_temperature") | |
| round(0) }} ºC | |
icon: >- | |
{% set state=state_attr("climate.clima_soggiorno", | |
"current_temperature")|round(0)|float(0) %} {% if state<22 %} | |
mdi:thermometer-low {% elif state<25 %} mdi:thermometer {% | |
else %} mdi:thermometer-high {% endif %} | |
icon_color: >- | |
{% set state=state_attr("climate.clima_soggiorno", | |
"current_temperature")|round(0)|float(0) %} {% if state<22 %} | |
blue {% elif state<24 %} green {% elif state<25 %} amber {% | |
else %} red {% endif %} | |
tap_action: | |
action: more-info | |
- type: template | |
entity: light.gruppo_luci_cucina | |
content: >- | |
{{ expand(state_attr("light.gruppo_luci_cucina", "entity_id"))| | |
selectattr("state","eq","on")|map(attribute="entity_id")|list|count | |
}} | |
icon: mdi:lightbulb | |
icon_color: >- | |
{% set count=expand(state_attr("light.gruppo_luci_cucina", | |
"entity_id"))| | |
selectattr("state","eq","on")|map(attribute="entity_id")|list|count | |
%} {% if count==0 %} grey {% else %} amber {% endif %} | |
tap_action: | |
action: navigate | |
navigation_path: '#cucina' | |
alignment: end | |
card_mod: | |
style: | | |
ha-card { | |
--chip-box-shadow: none; | |
--chip-background: none; | |
--chip-spacing: 0; | |
padding-top: 5px; | |
--chip-height: 40px | |
} | |
- type: horizontal-stack | |
cards: | |
- type: custom:mushroom-chips-card | |
fill_container: true | |
chips: | |
- type: template | |
entity: sensor.lavastoviglie_operation_state | |
icon: mdi:dishwasher | |
icon_color: >- | |
{% set | |
state=is_state("sensor.lavastoviglie_operation_state","Run") | |
%} {% if state %} blue {% else %} grey {% endif %} | |
tap_action: | |
action: more-info | |
- type: template | |
entity: >- | |
binary_sensor.ds_7608nxi_k20820230804ccrrae7092773wcvu_3_motiondetection | |
icon_color: >- | |
{% set | |
state=is_state("binary_sensor.ds_7608nxi_k20820230804ccrrae7092773wcvu_3_motiondetection","on") | |
%} {% if state %} red {% else %} grey {% endif %} | |
icon: mdi:motion-sensor | |
tap_action: | |
action: more-info | |
- type: template | |
entity: binary_sensor.sensore_ikea_2_cucina_finestra_contact | |
icon_color: >- | |
{% set | |
state=states('binary_sensor.sensore_ikea_2_cucina_finestra_contact') | |
%} {% if state=='on'%} amber {% elif state=='unavailable' %} | |
red {% else %} grey {% endif %} | |
icon: >- | |
{% set | |
state=states('binary_sensor.sensore_ikea_2_cucina_finestra_contact') | |
%} {% if state=='on'%} mdi:window-open-variant {% else %} | |
mdi:window-closed-variant {% endif %} | |
tap_action: | |
action: more-info | |
card_mod: | |
style: | | |
ha-card { | |
--chip-box-shadow: none; | |
--chip-background: none; | |
--chip-spacing: 0; | |
padding-left: 12px; | |
} | |
- type: custom:mushroom-chips-card | |
fill_container: true | |
chips: | |
- type: template | |
entity: cover.tapparella_cucina | |
icon_color: >- | |
{% set state=states('cover.tapparella_cucina') %} {% if | |
state=='open'%} white {% else %} grey {% endif %} | |
icon: >- | |
{% set state=states('cover.tapparella_cucina') %} {% if | |
state=='open'%} mdi:window-shutter-open {% else %} | |
mdi:window-shutter {% endif %} | |
tap_action: | |
action: more-info | |
- type: template | |
entity: climate.termostato_primo_piano_none | |
icon_color: >- | |
{% set state=states('climate.termostato_primo_piano_none') %} | |
{% if state=='heat'%} amber {% else %} grey {% endif %} | |
icon: mdi:fire | |
tap_action: | |
action: more-info | |
- type: template | |
entity: climate.clima_soggiorno | |
icon_color: >- | |
{% set state=states('climate.clima_soggiorno') %} {% if | |
state=='off'%} grey {% else %} blue {% endif %} | |
icon: mdi:snowflake | |
tap_action: | |
action: more-info | |
alignment: end | |
card_mod: | |
style: | | |
ha-card { | |
--chip-box-shadow: none; | |
--chip-background: none; | |
--chip-spacing: 0; | |
padding-right: 2px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment