本帖最后由 TripleZ 于 2026-2-1 16:23 编辑
具体效果:
path: t2_pro_detail
title: T2 Pro 详细设置
subview: true
cards:
- type: vertical-stack
cards:
- type: conditional
conditions:
- entity: switch.treeow_82170_smart_mode_switch
state: "off"
card:
type: custom:mushroom-fan-card
entity: fan.treeow_t2_pro_custom
show_percentage_control: true
icon_animation: true
name: T2 Pro 空气净化器
- type: conditional
conditions:
- entity: switch.treeow_82170_smart_mode_switch
state: "on"
card:
type: custom:mushroom-fan-card
entity: fan.treeow_t2_pro_custom
show_percentage_control: false
icon_animation: true
name: T2 Pro (智感模式)
- type: custom:mushroom-chips-card
alignment: center
chips:
- type: template
entity: sensor.treeow_82170_pm25
icon: mdi:air-filter
content: "PM2.5: {{ states(entity) }}"
icon_color: >
{% set val = states(entity) | float %} {{ 'green' if val <= 35
else 'orange' if val <= 75 else 'red' }}
tap_action:
action: more-info
- type: template
entity: sensor.treeow_82170_ch2o_value
icon: mdi:flask-round-bottom
content: "甲醛: {{ states(entity) }}"
icon_color: >
{% set val = states(entity) | float %} {{ 'green' if val <= 0.08
else 'red' }}
tap_action:
action: more-info
- type: template
entity: sensor.treeow_82170_aal
icon: mdi:gauge
content: AAL {{ states(entity) }}
tap_action:
action: more-info
- type: template
entity: sensor.treeow_82170_filter_life
icon: mdi:filter-check
content: 滤芯 {{ states(entity) }}%
icon_color: >
{% set val = states(entity) | float %} {{ 'green' if val > 20 else
'orange' if val > 10 else 'red' }}
tap_action:
action: more-info
- type: custom:mushroom-template-card
entity: switch.treeow_82170_smart_mode_switch
primary: "智感模式: {{ '已激活' if is_state(entity, 'on') else '已关闭' }}"
secondary: >-
{% if is_state(entity, 'on') %}智感档位: {{
states('select.treeow_82170_smart_fan_speed').replace('levels', ' 级')
}}{% else %}点击开启智感模式{% endif %}
icon: mdi:brain
tap_action:
action: toggle
icon_color: "{{ 'amber' if is_state(entity, 'on') else 'grey' }}"
- type: conditional
conditions:
- entity: switch.treeow_82170_smart_mode_switch
state: "on"
card:
type: vertical-stack
cards:
- type: custom:mushroom-select-card
entity: select.treeow_82170_smart_fan_speed
name: 智感风速档位
icon: mdi:fan
- type: grid
columns: 2
square: false
cards:
- type: custom:mushroom-entity-card
entity: select.treeow_82170_smart_night_switch
name: 智感夜间模式
secondary_info: 21:00 - 08:00
icon: mdi:weather-night
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_sensor_onoff
name: 传感器常开
icon: mdi:access-point
- type: custom:mushroom-number-card
entity: number.treeow_82170_smart_pm25
name: PM2.5 开机阈值
- type: custom:mushroom-number-card
entity: number.treeow_82170_smart_pm25_off
name: PM2.5 关机阈值
- type: custom:mushroom-number-card
entity: number.treeow_82170_smart_hcho
name: 甲醛开机阈值
- type: custom:mushroom-number-card
entity: number.treeow_82170_smart_hcho_off
name: 甲醛关机阈值
- type: conditional
conditions:
- entity: switch.treeow_82170_smart_mode_switch
state: "off"
card:
type: vertical-stack
cards:
- type: custom:mushroom-select-card
entity: select.treeow_82170_mode
name: 运行模式
icon: mdi:cog
- type: custom:mushroom-select-card
entity: select.treeow_82170_fan_speed_enum
name: 风速档位
icon: mdi:fan
- type: grid
columns: 3
square: false
cards:
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_anion
name: 负离子
icon: mdi:atom
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_uv
name: UV 杀菌
icon: mdi:lightbulb-on
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_child_lock
name: 童锁
icon: mdi:lock-outline
- type: grid
columns: 3
square: false
cards:
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_light
name: 屏幕
icon: mdi:monitor
- type: custom:mushroom-entity-card
entity: select.treeow_82170_screen_set
name: 屏幕亮度
icon: mdi:brightness-6
- type: custom:mushroom-entity-card
entity: switch.treeow_82170_speaker_onoff
name: 嗇叭
icon: mdi:volume-high
- type: grid
columns: 2
square: false
cards:
- type: custom:mushroom-entity-card
entity: sensor.treeow_82170_temp_indoor
name: 室内温度
icon: mdi:thermometer
- type: custom:mushroom-entity-card
entity: sensor.treeow_82170_humidity
name: 室内湿度
icon: mdi:water-percent
- type: custom:mushroom-chips-card
alignment: center
chips:
- type: template
entity: sensor.treeow_82170_filter_life
icon: mdi:filter
content: 寿命 {{ states(entity) }}%
icon_color: >-
{% set val = states(entity) | float %} {{ 'green' if val > 20 else
'orange' if val > 10 else 'red' }}
tap_action:
action: more-info
- type: template
entity: sensor.treeow_82170_filter_days
icon: mdi:calendar-clock
content: 剩余 {{ states(entity) }} 天
tap_action:
action: more-info
- type: template
entity: sensor.treeow_82170_runtime_total
icon: mdi:timer-outline
content: 运行 {{ (states(entity) | float / 60) | round(0) }}h
tap_action:
action: more-info
- type: custom:mushroom-template-card
entity: button.treeow_82170_filter_reset
primary: 滤芯复位
secondary: 更换滤芯后点击重置
icon: mdi:restart
icon_color: red
tap_action:
action: call-service
service: button.press
target:
entity_id: button.treeow_82170_filter_reset
confirmation:
text: 确定要重置滤芯寿命吗?
|