killadm
2018-04-08 10:33:57 +08:00
在属性里,需要把它转换一下
```yaml
sensor:
- platform: template
sensors:
xiaomi_ap_aqi:
friendly_name: PM2.5
value_template: "{{ states.fan.xiaomi_air_purifier_pro.attributes.aqi }}"
unit_of_measurement: "µg/m³"
xiaomi_ap_temp:
friendly_name: 温度
value_template: "{{ states.fan.xiaomi_air_purifier_pro.attributes.temperature }}"
unit_of_measurement: "°C"
xiaomi_ap_humid:
friendly_name: 湿度
value_template: "{{ states.fan.xiaomi_air_purifier_pro.attributes.humidity }}"
unit_of_measurement: "%"
```
把 xiaomi_air_purifier_pro 替换成你的净化器名称