Xiaomi Purifier lovelace card with css animation
- compact view to show temperature and humidity
- button to turn on/off buzzer
- double click to swith led
- hold "Favorite" button to adjust fan speed
- HACS -> Settings -> Add custom repository <-> Plugin
- Find 'xiaomi purifier' in HACS Plugins
- Install and add to Lovelace
- Download
xiaomi-purifier.js
towww/plugins/xiaomi-purifier.js
- Add to lovelace resources
resources: - url: /local/plugins/xiaomi-purifier.js type: js
type: 'custom:xiaomi-purifier'
entity: fan.anyid
title: name of the purifier device
advanced: #optional (true for showing temperature and humidity in the middle, otherwise shows in green panel)
Displays English texts by default, for Chinese language users, add
language: chs
to card configuration for displaying texts in Chinese.
Add translations to get your own language support.
translate:
'Good': '优',
'Moderate': '良',
'Mild Unhealthy':'轻度污染',
'Unhealthy': '中度污染',
'Very Unhealthy': '重度污染',
'Hazardous': '严重污染',
'Air Purifier': '空气净化器',
'On': '开启',
'Off': '关闭',
'Set speed': '设置速度',
'Device turned on': '开启设备',
'Device turned off': '关闭设备',
'Indoor AQ': '室内空气',
'Auto': '自动',
'Silent': '睡眠',
'Favorite':'最爱',
'Temperature': '温度',
'Humidity': '湿度'
shaonianzhentan (Original Author)