|
template:
- sensor:
- name: airhumidifier_humidity
friendly_name: '环境湿度'
device_class: humidity
value_template: '{{ states.fan.xiaomi_air_humidifier.attributes.humidity }}'
unit_of_measurement: '%'
- sensor:
- name: airhumidifier_temperature
friendly_name: '环境温度'
value_template: '{{ states.fan.xiaomi_air_humidifier.attributes.temperature }}'
- sensor:
- name: airhumidifier_target_humidity
friendly_name: Target humidity
device_class: humidity
value_template: '{{ states.fan.xiaomi_air_humidifier.attributes.target_humidity }}'
unit_of_measurement: '%'
icon_template: mdi:water-percent
- switches:
- name: xiaomi_airpurifier_buzzer
friendly_name: "提示声"
value_template: "{{ is_state_attr('fan.xiaomi_air_humidifier', 'buzzer', True) }}"
turn_on:
service: xiaomi_miio_airpurifier.fan_set_buzzer_on
data:
entity_id: fan.xiaomi_air_humidifier
turn_off:
service: xiaomi_miio_airpurifier.fan_set_buzzer_off
data:
entity_id: fan.xiaomi_air_humidifier
icon_template: "mdi:volume-off"
- binary_sensor:
- name: xiaomi_humidifier_nowater
value_template: >
{{ is_state('states.fan.xiaomi_air_humidifier.attributes.no_water', 'True') }}
为什么不能识别呀,是哪里写错了吗
|
|