al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.12k stars 577 forks source link

Xiaomi Humidifier 3 #1420

Open RykovDC opened 7 months ago

RykovDC commented 7 months ago

Device model / 设备型号

zhimi.humidifier.ca6

Component version / 插件版本

2.2.6_0043

HA core version / HA版本

2023.11.3

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

Hello! I purchased Smartmi Humidifier 3. In the Home Assistant, the water level is constantly displayed at 1%. Although the status in MiHome is as shown in the screenshot. Can you help me? IMG_6719 IMG_6721 IMG_6720

Entity attributes / 实体属性

min_humidity: 30
max_humidity: 60
available_modes:
  - "Off"
  - Fav
  - Auto
  - Sleep
humidity: 60
mode: Fav
model: zhimi.humidifier.ca6
lan_ip: 192.168.1.75
mac_address: C8:5C:CC:40:2E:22
entity_class: MiotHumidifierEntity
home_room: Гассия 21, 311 Спальня
miot_type: urn:miot-spec-v2:device:humidifier:0000A00E:zhimi-ca6:1
humidifier.on: true
humidifier.fault: 0
humidifier.fan_level: 0
humidifier.target_humidity: 60
humidifier.water_level: 1
humidifier.automatic_air_drying: true
humidifier.status: 2
other.actual_speed: 1100
other.country_code: 44
other.clean: false
other.self_clean_percent: 0
other.pump_state: false
other.pump_cnt: 1614
physical_controls_locked: false
screen.brightness: 2
alarm: true
environment.temperature: 25
environment.relative_humidity: 59
state_updater: cloud
sub_entities:
  - humidifier-2.water_level-7
  - other-7.actual_speed-1
  - alarm-4.alarm-1
  - other-7.clean-5
  - screen-5.brightness-2
  - environment-3.temperature-7
  - environment-3.relative_humidity-9
  - physical_controls_locked-6.physical_controls_locked-1
device_class: humidifier
friendly_name: Увлажнитель 2
supported_features: 1

Home Assistant Logs / 系统日志

No response

al-one commented 7 months ago
{
    "iid":7,
    "type":"urn:miot-spec-v2:property:water-level:0000003D:zhimi-ca6:1",
    "description":"Water Level",
    "format":"uint8",
    "access":[
        "read",
        "notify"
    ],
    "unit":"percentage",
    "value-range":[
        0, # min
        2, # max
        1  # step
    ]
}

The device specifications are defined by the manufacturer, and the water-level has been assigned an incorrect range. Perhaps you can try using ip/token to integrate this device.

danishru commented 6 months ago

I have the same problem. Can I fix this myself?

RykovDC commented 6 months ago

I have the same problem. Can I fix this myself?

I just had to deal with it.

KekcuHa commented 6 months ago

Faced the same issue, water level reports as a binary value: 1 or 0.

RykovDC commented 6 months ago

Is there any way to solve this problem without a token?

danishru commented 6 months ago

Faced the same issue, water level reports as a binary value: 1 or 0.

No, not as a binary value. There is a list of three values. 0 - empty 1 - normal 2 - full

This needs to be corrected in the hass-xiaomi-miot specification

The screenshot below shows changes in values within the range of 0-2. The manufacturer installed a different water level sensor in this humidifier, which detects only 3 levels, since there were frequent problems with the previous ones.

Снимок экрана 2023-12-27 092036

RykovDC commented 6 months ago

Faced the same issue, water level reports as a binary value: 1 or 0.

No, not as a binary value. There is a list of three values. 0 - empty 1 - normal 2 - full

This needs to be corrected in the hass-xiaomi-miot specification

The screenshot below shows changes in values within the range of 0-2. The manufacturer installed a different water level sensor in this humidifier, which detects only 3 levels, since there were frequent problems with the previous ones.

Снимок экрана 2023-12-27 092036

And how to fix it in hass-xiaomi-miot?

danishru commented 6 months ago

Faced the same issue, water level reports as a binary value: 1 or 0.

No, not as a binary value. There is a list of three values. 0 - empty 1 - normal 2 - full This needs to be corrected in the hass-xiaomi-miot specification The screenshot below shows changes in values within the range of 0-2. The manufacturer installed a different water level sensor in this humidifier, which detects only 3 levels, since there were frequent problems with the previous ones. Снимок экрана 2023-12-27 092036

And how to fix it in hass-xiaomi-miot?

I don’t know, apparently the integration developers should do this.

c1tru55 commented 6 months ago

@al-one +1, please see this: https://github.com/al-one/hass-xiaomi-miot/issues/1420#issuecomment-1869990274 it's not a % value, but 3 possible states: