#change dashboard tile color with temp?
1 messages · Page 1 of 1 (latest)
like would it be possible to have that entity turn red when it reaches a set threshold?
type: horizontal-stack
cards:
- type: tile
entity: sensor.ir_bep_temperature
card_mod:
style:
.: |-
ha-state-icon {
{% if states(config.entity)|float(0) > 26 %}
color: rgba(255, 106, 106,1) !important;
{% elif states(config.entity)|float(0) > 21 %}
color: rgba(99, 184, 255,1) !important;
{% else %}
color: rgba(0, 191, 255,1) !important;
{% endif %}
}
ha-card {
--ha-card-background: rgba(255, 228, 181, 0.3) !important;
}
ha-tile-info$: |-
.primary {
font-size: 20px !important;
font-weight: 500 !important;
color: white !important;
padding-bottom: 4px;
}
.secondary {
font-size: 12px !important;
color: rgba(24, 188, 242, 1) !important;
}
ha-tile-icon$: |-
.shape::before {
{% if states(config.entity)|float(0) > 26 %}
background-color: rgba(255, 106, 106,1) !important;
{% elif states(config.entity)|float(0) > 21 %}
background-color: rgba(99, 184, 255,1) !important;
{% else %}
background-color: rgba(0, 191, 255,1) !important;
{% endif %}
opacity: 0.3 !important;
}