Xiaomi Humidifier support

I also have a humidifier of the 2nd version (zhimi.humidifier. ca4). The standard integration does not have the water_level attribute. Although this attribute is described in the documentation.

1 Like

Hey @edozat1,
I canā€™t help you, but maybe u can (sorry to disapoint you :smile: ).
Would you mind to share the entries you made in the config.yaml and the code you wrote in the card in you Lovelace UI?
Regards

@Magix3D Itā€™s been a while, but I think I took the following steps:

  1. Start with this guide: Xiaomi Miio - Home Assistant to get a token from the mi-home app. I used BlueStacks.

  2. Add this repository in HACS: GitHub - syssi/xiaomi_airpurifier: Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier integration for Home Assistant

  3. Add this to you config.yaml:

fan:
  - platform: xiaomi_miio
    name: Luchtbevochtiger
    host: !secret host_ip
    token: !secret xiaomi_humidifier_token
    model: zhimi.humidifier.ca4

Now you should have the fan entity

  1. The card is a custom card in HACS: GitHub - artem-sedykh/mini-humidifier: Minimalistic humidifier card for Home Assistant Lovelace UI

Hope this helps

1 Like

@edozat1 Thank you, and how did you manage to get the humidifier working with the custom card?
My current problem is, that I add the entities one for one to my config.yaml like this:

fan:
  # Antibacterial Humidifier
  - platform: xiaomi_miio_airpurifier
    name: Antibacterial Humidifier
    host: secretip
    token: secrettoken
    model: deerma.humidifier.jsq

switch:
  # Antibacterial Humidifier
  platform: template
  switches:
    airhumidifier_temperature_buzzer:
      friendly_name: Air Humidifier Buzzer
      value_template: "{{ is_state_attr('fan.antibacterial_humidifier', 'buzzer', True) }}"
      turn_on:
        service: xiaomi_miio_airpurifier.fan_set_buzzer_on
        data:
          entity_id: fan.antibacterial_humidifier
      turn_off:
        service: antibacterial_humidifier.fan_set_buzzer_off
        data:
          entity_id: fan.antibacterial_humidifier
      icon_template: mdi:volume-high

sensor:
  platform: template
  sensors:
    airhumidifier_temperature:
      friendly_name: Air Humidifier Temperature
      value_template: '{{ states.fan.antibacterial_humidifier.attributes.temperature }}'
      unit_of_measurement: 'Ā°C'
    airhumidifier_humidity:
      friendly_name: Air Humidifier Humidity
      value_template: '{{ states.fan.antibacterial_humidifier.attributes.humidity }}'
      unit_of_measurement: '%'
      icon_template: mdi:water-percent
    airhumidifier_buzzery:
      friendly_name: Air Humidifier Sound
      value_template: '{{ states.fan.antibacterial_humidifier.attributes.humidity }}'
      unit_of_measurement: '%'
      icon_template: mdi:water-percent
    airhumidifier_water_tank_detached:
      friendly_name: Air Humidifier Water Tank
      value_template: '{{ states.fan.antibacterial_humidifier.attributes.water_tank_detached }}'
      unit_of_measurement: '%'
      icon_template: mdi:water-boiler

The custom card doesnā€™t recognise anything though.

I can add these entities manually to my UI and they work, but not with the card.

@Magix3D Right, step 5 is missingā€¦

When youā€™ve added the custom card in HACS, you can add a manual card with the following config:

type: 'custom:mini-humidifier'
entity: fan.friendlyname
1 Like

@edozat1 Thatā€™s it - thank you very much :slight_smile:

Hey @syssi,
since you apparently know a few things (:P) - do you happen to know what @edozat1 and me can do about the issue, that the water level isnā€™t showing in the mini-humidifier-card?
Regards

@Magix3D Please contact the author of the custom card and ask for deerma.humidifier.jsq support. It looks like the custom card doesnā€™t support all versions out of the box:

Good idead - Iā€™ll do that - thank you :slight_smile:

hass-xiaomi-miot maybe supports it without yaml.

hey folks got mine humidifier today, is anybody out there who got it working in different subnets/VLANs? I already saw that this might cause in errors, but that there are a few of ppl got it working.

fan:
platform: xiaomi_miio_airpurifier
name: Luftbefeuchter
host: 192.168.180.31
token: XXXXXXXXX
model: deerma.humidifier.jsq

I ran into error below:

logger: custom_components.xiaomi_miio_airpurifier.fan
Source: custom_components/xiaomi_miio_airpurifier/fan.py:1664
Integration: xiaomi_miio_airpurifier ([documentation](https://github.com/syssi/xiaomi_airpurifier), [issues](https://github.com/syssi/xiaomi_airpurifier/issues))
First occurred: 16:16:25 (1 occurrences)
Last logged: 16:16:25

Got exception while fetching the state: Unable to discover the device 192.168.180.31

I just did it yesterday for the deerma.humidifier.jsq, it works with this HACS integration (cloud): hass-xiaomi-miot/README.md at master Ā· al-one/hass-xiaomi-miot Ā· GitHub
Aside from the device itself, the entities exposed are:

  • Humidity Sensor
  • Temperature Sensor
  • Light (its LED)

You can turn it on/off and set a target humidity.

I was a bit disappointed that there is no water tank level, not sure if itā€™s a limitation of the hardware or of the integration, but itā€™s missing also from the app.

If anyone knows how to bypass the cloud account and go for local control only, Iā€™m all ears.

EDIT: HA and the Humidifier are on separate VLANs

Did you find a solution?

I get the same error in the logs and the fan shows as unavailable in Developer Tools.
Only difference is I run everything on the same routher with no subnetā€™s.

Water tank is added in the next HA release

1 Like

No solution for different vlans, I brought it to the same vlan as the HA server :man_shrugging:

This model will be supported by the core integration after 2021.9 release Xiaomi Miio - Home Assistant

2 Likes

My deerma.humidifier.jsq is realy unreliable (see screenshot). I have tested it with both syssiā€™s xiaomi_airpurifier custom component and the Xiaomi Miio core integration.
When it works, it work well and I canā€™t say one integration is different from the other on this matter. Also thereā€™s no problem in Mi Home app.

Home assistant log:

2021-09-06 15:09:35 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Mi Smart Antibacterial Humidifier' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.1.125; Retrying in background
2021-09-06 15:43:03 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching Mi Smart Antibacterial Humidifier data

Iā€™m trying to add an Xiaomi mi antibacterial humidifier, it should be supported itā€™s an deerma.humidifier.jsq5.
This is my config:

fan:
  - platform: xiaomi_miio_airpurifier
    name: Humidifier Office
    host: ip_address
    token: token
    model: deerma.humidifier.jsq5

But in de logging i am getting this error:
Got exception while fetching the state: Unable to discover the device ip_address

With extra debug logging on i get no extra messages.
What can be the problem?
Iā€™m using this integration with hacs:

same,

Any news with deerma.humidifier.jsq5 support?

1 Like

I have it working with the hacs integration Xiaomi Miot Auto.
Extracten the key with the extractor tool and added it local.