2 Commits
v0.4.4 ... main

Author SHA1 Message Date
Li Shuzhen
33ee65cf75 fix: ignore mdns REMOVED package (#1296)
Some checks failed
Tests / check-rule-format (push) Failing after 0s
Validate / validate-hassfest (push) Failing after -1s
Validate / validate-hacs (push) Failing after 6s
Validate / validate-lint (push) Failing after -2s
Validate / validate-setup (push) Failing after 0s
2025-11-17 11:15:10 +08:00
Quint Stoffers
f95c71c2ad fix: xiaomi.derh.lite temperature precision (#1505)
* fix: xiaomi.derh.lite temperature precision

Add value-range step of 0.1 for dehumidifier temperature property to preserve decimal precision.

The xiaomi.derh.lite dehumidifier was reporting temperature as integer instead of float due to the default value-range step of 1. This fix changes the step to 0.1 to allow one decimal place precision (e.g., 22.5°C instead of 23°C).

Similar to the fix for cgllc.airm.cgd1st air monitor in commit 580ff87.

* chore: sort dehumidifier entry
2025-11-17 10:48:53 +08:00
3 changed files with 15 additions and 8 deletions

View File

@@ -1048,11 +1048,11 @@ class MIoTClient:
mips = self._mips_local.get(group_id, None)
if mips:
if state == MipsServiceState.REMOVED:
mips.disconnect()
self._mips_local.pop(group_id, None)
return
if (
# if state == MipsServiceState.REMOVED:
# mips.disconnect()
# self._mips_local.pop(group_id, None)
# return
if ( # ADDED or UPDATED
mips.client_id == self._entry_data['virtual_did']
and mips.host == data['addresses'][0]
and mips.port == data['port']

View File

@@ -232,9 +232,10 @@ class MipsService:
for item in list(self._services.values()):
if item['name'] != name:
continue
service_data = self._services.pop(item['group_id'], {})
self.__call_service_change(
state=MipsServiceState.REMOVED, data=service_data)
# Ignore mdns REMOVED package. Let the connection close by itself.
# service_data = self._services.pop(item['group_id'], {})
# self.__call_service_change(
# state=MipsServiceState.REMOVED, data=service_data)
return
self._main_loop.create_task(
self.__request_service_info_async(zeroconf, service_type, name))

View File

@@ -138,6 +138,12 @@ urn:miot-spec-v2:device:bath-heater:0000A028:xiaomi-s1:1:
urn:miot-spec-v2:device:curtain:0000A00C:bjkcz-kczble:1:0000D031:
prop.2.2:
name: status-a
urn:miot-spec-v2:device:dehumidifier:0000A02D:xiaomi-lite:1:
prop.3.2:
value-range:
- -30
- 100
- 0.1
urn:miot-spec-v2:device:electronic-valve:0000A0A7:sanmei-s1:1:
prop.3.1:
format: float