Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
type: custom:mushroom-template-card
primary: Kü {{ states(entity) }}°C
secondary: |2-
{{ states("sensor.thermostat_kuche_temperatur") }}°C - {{
states("sensor.thermostat_kueche_valve_state") }}%
entity: sensor.t1_temperature
icon: mdi:pot-steam
layout: horizontal
tap_action:
action: more-info
icon_color: |
{% set battery_level = states(entity) %}
{% if battery_level < '15' %}
blue
{% elif battery_level < '17' %}
teal
{% elif battery_level < '18' %}
green
{% elif battery_level < '19' %}
light-green
{% elif battery_level < '20' %}
lime
{% elif battery_level < '21' %}
yellow
{% elif battery_level < '22' %}
amber
{% elif battery_level < '24' %}
orange
{% elif battery_level < '27' %}
deep-orange
{% else %}
red
{% endif %}
multiline_secondary: false
fill_container: true
card_mod:
style: |
ha-card {
{% set battery_level = states(config.entity) %}
{% if battery_level < '15' %}
background: rgba(var(--rgb-blue),0.30);
{% elif battery_level < '17' %}
background: rgba(var(--rgb-teal),0.30);
{% elif battery_level < '18' %}
background: rgba(var(--rgb-green),0.30);
{% elif battery_level < '19' %}
background: rgba(var(--rgb-green),0.30);
{% elif battery_level < '20' %}
background: rgba(var(--rgb-lime),0.30);
{% elif battery_level < '21' %}
background: rgba(var(--rgb-yellow),0.30);
{% elif battery_level < '22' %}
background: rgba(var(--rgb-amber),0.30);
{% elif battery_level < '24' %}
background: rgba(var(--rgb-orange),0.30);
{% elif battery_level < '27' %}
background: rgba(var(--rgb-deep-orange),0.30);
{% elif battery_level == 'unknown' %}
background: rgba(var(--rgb-secondary-text-color),0.30);
{% else %}
background: rgba(var(--rgb-red),0.5);
{% endif %}
}
type: custom:mushroom-template-card
primary: Küche Thermostat {{ states(entity) }}% geöffnet
entity: sensor.kuche_ik_thermostat_heating
icon: mdi:pot-steam
layout: horizontal
tap_action:
action: more-info
icon_color: |
{% set level = states(entity) %}
{% if level < '1' %}
green
{% elif level < '25' %}
yellow
{% elif level < '50' %}
orange
{% elif level < '75' %}
deep-orange
{% else %}
red
{% endif %}
multiline_secondary: false
fill_container: true
secondary: ''
card_mod:
style: |
ha-card {
{% set level = states(config.entity) %}
{% if level < '1' %}
background: rgba(var(--rgb-green),0.30);
{% elif level < '25' %}
background: rgba(var(--rgb-yellow),0.30);
{% elif level < '50' %}
background: rgba(var(--rgb-orange),0.30);
{% elif level < '75' %}
background: rgba(var(--rgb-deep-orange),0.30);
{% elif level == 'unknown' %}
background: rgba(var(--rgb-secondary-text-color),0.30);
{% else %}
background: rgba(var(--rgb-red),0.5);
{% endif %}
}
Ist dem so? Wenn Du beiJa schon, aber dann reagiert ja die Farbänderung auch auf diese entities.
primary: Küche Thermostat {{ states(entity) }}% geöffnet
stattdessen primary: Küche Temperatur: {{ states("sensor.kuche_ik_thermostat_temp") }}°
(oder wie auch immer Du es genannt hast) reinschreibst, und den Rest nicht anrührst?card_mod:
style: |
ha-card {
{% set level = states(config.entity) %}
{% if level < '600' %}
background: rgba(var(--rgb-green),0.30);
{% elif level < '1000' %}
background: rgba(var(--rgb-yellow),0.30);
{% elif level < '1500' %}
background: rgba(var(--rgb-orange),0.30);
{% elif level < '2000' %}
background: rgba(var(--rgb-deep-orange),0.30);
{% elif level == 'unknown' %}
background: rgba(var(--rgb-secondary-text-color),0.30);
{% else %}
background: rgba(var(--rgb-red),0.5);
{% endif %}
}
{% set level = states(config.entity) | int %}
{% set level = states(config.entity %}
{% if is_number(level) %}
{% set level = level | int %}
{% if level < 600 %}
background: rgba(var(--rgb-green),0.30);
{% elif level < 1000 %}
background: rgba(var(--rgb-yellow),0.30);
{% elif level < 1500 %}
background: rgba(var(--rgb-orange),0.30);
{% elif level < 2000 %}
background: rgba(var(--rgb-deep-orange),0.30);
{% else %}
background: rgba(var(--rgb-red),0.5);
{% endif %}
{% else %}
background: rgba(var(--rgb-secondary-text-color),0.30);
{% endif %}