A custom Lovelace card for Home Assistant providing a thermostat-style interface for Xiaomi humidifiers. Features an interactive 270° arc dial with draggable target, color-coded humidity levels, and smooth animations.
- Thermostat-style circular dial with 270° arc and draggable thumb
- Color gradient by humidity level (orange → yellow → green → blue)
- Current humidity marker on the arc with pulsing animation
- +/− buttons with long-press repeat for precise control
- Mode selection chips (Low, Medium, High, Auto, Silent, Favorite)
- Auto-discovery of related switches, sensors, numbers, selects, buttons
- Water tank status indicators (no water, shortage, tank OK)
- Responsive design — mobile, tablet, desktop
- Multi-language support (English, Russian)
- Visual config editor — no YAML required
- Off-state styling — dimmed circle when device is off
- Open HACS in Home Assistant
- Click on Frontend → + → search Xiaomi Humidifier Card
- Click Install
- Refresh your browser
- Download
xiaomi-humidifier-card.jsfrom the latest release - Copy to
config/www/xiaomi-humidifier-card.js - Add resource: Settings → Dashboards → Resources → Add Resource
- URL:
/local/xiaomi-humidifier-card.js - Type: JavaScript Module
- URL:
Add a card → search "Xiaomi Humidifier Card" → select entity → done.
type: custom:xiaomi-humidifier-card
entity: fan.deerma_jsq2w_humidifier
name: Bedroom Humidifier
show_name: true
show_state: true
show_target_humidity: true
show_mode: true
show_power: true
show_sensors: true
show_switches: true
show_numbers: true
show_selects: true
show_buttons: true
compact: false| Option | Type | Default | Description |
|---|---|---|---|
entity |
string | Required | Entity ID (fan.* or humidifier.*) |
name |
string | Entity name | Custom display name |
show_name |
boolean | true |
Show device name |
show_state |
boolean | true |
Show on/off state |
show_target_humidity |
boolean | true |
Show target humidity control |
show_mode |
boolean | true |
Show mode chips |
show_power |
boolean | true |
Show power button |
show_sensors |
boolean | true |
Show sensor values |
show_switches |
boolean | true |
Show switch toggles |
show_numbers |
boolean | true |
Show number sliders |
show_selects |
boolean | true |
Show select dropdowns |
show_buttons |
boolean | true |
Show action buttons |
compact |
boolean | false |
Compact mode |
humidity_entity: sensor.custom_humidity
target_humidity_entity: number.custom_target
temperature_entity: sensor.custom_temp
mode_entity: select.custom_modeThe arc color indicates humidity comfort level:
| Range | Color | Meaning |
|---|---|---|
| < 35% | Orange | Too dry |
| 35–45% | Yellow | Slightly dry |
| 45–55% | Green | Comfortable |
| 55–65% | Light blue | Humid |
| > 65% | Blue | Very humid |
The card discovers related entities by device base ID:
- Switches:
switch.{device}_led,_buzzer,_child_lock,_dry,_ptc, etc. - Sensors:
sensor.{device}_temperature,_humidity,_water_level,_filter_life_remaining, etc. - Numbers:
number.{device}_favorite_level,_fan_level,_volume,_target_humidity, etc. - Selects:
select.{device}_led_brightness,_mode,_ptc_level, etc. - Buttons:
button.{device}_reset_filter,_filters_cleaned - Binary sensors:
binary_sensor.{device}_no_water,_water_shortage,_water_tank
Works with Xiaomi humidifiers via:
- Deerma JSQ2W / JSQ5 / MJJSQ
- Xiaomi CA1 / CB1 / CA4
- Xiaomi Humidifier V1
- Shuii JSQ001
git clone https://github.com/dzerik/xiaomi-humidifier-card.git
cd xiaomi-humidifier-card
npm install
npm run build # production build
npm run watch # dev mode with auto-rebuildContributions welcome! Please submit a Pull Request.