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.67k stars 664 forks source link

當空氣感測器無法到達時,所有值均達到最大值 #1968

Open eugenet8k opened 4 days ago

eugenet8k commented 4 days ago

我使用本地連接到空氣感測器。有時連接會中斷,此時所有感測器(CO2、溫度、濕度)值都具有非常大的值,例如 99,999%

如果可能,請修復它,​​以便在連接失敗時不報告任何值。

This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.sensor
Source: custom_components/xiaomi_miot/__init__.py:1455
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 2:53:57 PM (1 occurrences)
Last logged: 2:53:57 PM

Bathroom(cgllc.airmonitor.s1):
Got MiioException while fetching the state:
Unable to discover the device 10.0.1.221,
mapping: {'environment.relative_humidity': {'siid': 2, 'piid': 1}, 'environment.pm2_5_density': {'siid': 2, 'piid': 2},
'environment.temperature': {'siid': 2, 'piid': 3},
'environment.co2_density': {'siid': 2, 'piid': 4},
'environment.tvoc_density': {'siid': 2, 'piid': 5}, 'battery_level': {'siid': 3, 'piid': 1},
'battery.charging_state': {'siid': 3, 'piid': 2}},
max_properties: 10/7

image

image

al-one commented 4 days ago

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -
eugenet8k commented 4 days ago

@al-one 這個問題很少發生,但它破壞了我的統計數據。感謝您的修復,但我無法立即驗證,因為這種情況很少見