Hi there,
Im trying to build a room card that shows the snowflake (under 45) or fire (above 85) icon based on the temp. I have no problem with any other sensor or entity but for the life of me can’t figure this one out.
Here’s my code so far:
type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Garage
icon: mdi:garage-variant
entity: null
tap_action:
action: toggle
hold_action:
action: navigate
navigation_path: garage
icon_color: "{{ 'accent' if is_state(entity, 'on') else 'disabled' }}"
fill_container: true
layout: horizontal
multiline_secondary: false
card_mod:
style: |
:host([dark-mode]) {
background: rgba(var(--rgb-primary-background-color), 0.2);
}
:host {
background: rgba(var(--rgb-primary-text-color), 0.025);
}
- type: custom:mushroom-chips-card
chips:
- type: conditional
conditions:
- condition: or
conditions:
- condition: numeric_state
entity: sensor.aqara_temp_humidity_sensor_temperature
above: 85
- condition: numeric_state
entity: sensor.aqara_temp_humidity_sensor_temperature
below: 95
chip:
- type: template
icon: >
{% set temp = states('sensor.aqara_temp_humidity_sensor_temperature') | float %}
{% if temp < 95 %}
mdi:snowflake
{% else %}
mdi:fire
{% endif %}
icon_color: >
{% set temp = states('sensor.aqara_temp_humidity_sensor_temperature') | float %}
{% if temp < 95 %}
blue
{% else %}
red
{% endif %}
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
}
card_mod:
style: |
ha-card {
height: 102px;
{% if is_state('light.entryway_lights_light', 'on') %}
background: rgba(255, 152, 0, 0.1);
{% endif %}
}
Any help is greatly appreciated!