type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
icon: mdi:home
entity: sensor.daikin_tvoc_sensor
primary: 全屋空气
secondary: >-
{{ states('sensor.quan_wu_wen_du') | float(0) | int }}°C|{{
states('sensor.quan_wu_shi_du') | float(0) | int }}%
icon_tap_action:
action: more-info
color: >-
{% set tvoc = states(entity) | float(0) %} {{['green', 'blue', 'yellow',
'orange', 'purple', 'red'] [(tvoc > 300) + (tvoc > 500) + (tvoc > 1000) +
(tvoc > 2000) + (tvoc > 3000)]}}
features_position: bottom
- type: custom:mini-graph-card
entities:
- entity: sensor.quan_wu_wen_du
name: 温度
icon: mdi:temperature-celsius
color: var(--green-color)
- entity: sensor.quan_wu_shi_du
name: 湿度
icon: mdi:water-percent
color: var(--indigo-color)
y_axis: secondary
line_width: 1
font_size: 75
hours_to_show: 24
points_per_hour: 4
show:
name_adaptive_color: true
icon: false
name: false
state: false
legend: true
fill: fade
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
icon: mdi:air-filter
primary: 甲醛
secondary: "{{ states('sensor.daikin_ch2o_sensor') | float(0) | int -13 }}µg/m³"
entity: sensor.daikin_ch2o_sensor
icon_tap_action:
action: more-info
color: >-
{% set ch2o = states('sensor.daikin_ch2o_sensor') | float(0) | int -13
%} {% if ch2o >500 %}brown{% elif ch2o >100 %}red{% elif ch2o >50
%}orange{% else %}green{% endif %}
vertical: true
features_position: bottom
- type: custom:mushroom-template-card
icon: mdi:molecule-co2
primary: CO2
secondary: "{{ states('sensor.daikin_co2_sensor') | float(0) | round(0) }}ppm"
entity: sensor.daikin_co2_sensor
icon_tap_action:
action: more-info
color: >-
{% set co2 = states('sensor.daikin_co2_sensor') | float(0) | int %} {%
if co2 >5000 %}brown{% elif co2 >2000 %}red{% elif co2 >1000
%}orange{% else %}green{% endif %}
vertical: true
features_position: bottom
- type: custom:mushroom-template-card
icon: mdi:molecule
primary: PM2.5
secondary: "{{ states('sensor.daikin_pm2_5_sensor') | float(0) | round(0) }}µg/m³"
entity: sensor.daikin_pm2_5_sensor
icon_tap_action:
action: more-info
color: >-
{% set pm25 = states('sensor.daikin_pm2_5_sensor') | float(0) | int %}
{% if pm25 > 250 %}brown{% elif pm25 > 150 %}red{% elif pm25 > 115
%}orange{% elif pm25 > 75 %}yellow{% elif pm25 > 35 %}green{% else
%}blue{% endif %}
vertical: true
features_position: bottom
- type: custom:mushroom-template-card
icon: mdi:radiator
primary: TVOC
secondary: "{{ states('sensor.daikin_tvoc_sensor') | float(0) | round(0) }}µg/m³"
entity: sensor.daikin_tvoc_sensor
icon_tap_action:
action: more-info
color: >-
{% set tvoc = states('sensor.daikin_tvoc_sensor') | float(0) %} {% if
tvoc > 3000 %}red {% elif tvoc > 2000 %}purple {% elif tvoc > 1000
%}orange {% elif tvoc > 500 %}yellow {% elif tvoc > 300 %}blue {%
else %}green {% endif %}
vertical: true
features_position: bottom
- type: custom:mini-graph-card
entities:
- entity: sensor.daikin_ch2o_sensor
name: 甲醛
icon: mdi:molecule-co2
color: var(--purple-color)
y_axis: secondary
- entity: sensor.daikin_co2_sensor
name: CO2
icon: mdi:molecule
color: var(--green-color)
- entity: sensor.daikin_pm2_5_sensor
name: PM2.5
icon: mdi:molecule
color: var(--blue-color)
y_axis: secondary
- entity: sensor.daikin_tvoc_sensor
name: TVOC
color: var(--yellow-color)
line_width: 1
font_size: 75
hours_to_show: 24
points_per_hour: 4
show:
name_adaptive_color: true
icon: false
name: false
state: false
legend: true
fill: fade
|