mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-11-21 11:38:58 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33ee65cf75 | ||
|
|
f95c71c2ad |
@@ -1048,11 +1048,11 @@ class MIoTClient:
|
|||||||
|
|
||||||
mips = self._mips_local.get(group_id, None)
|
mips = self._mips_local.get(group_id, None)
|
||||||
if mips:
|
if mips:
|
||||||
if state == MipsServiceState.REMOVED:
|
# if state == MipsServiceState.REMOVED:
|
||||||
mips.disconnect()
|
# mips.disconnect()
|
||||||
self._mips_local.pop(group_id, None)
|
# self._mips_local.pop(group_id, None)
|
||||||
return
|
# return
|
||||||
if (
|
if ( # ADDED or UPDATED
|
||||||
mips.client_id == self._entry_data['virtual_did']
|
mips.client_id == self._entry_data['virtual_did']
|
||||||
and mips.host == data['addresses'][0]
|
and mips.host == data['addresses'][0]
|
||||||
and mips.port == data['port']
|
and mips.port == data['port']
|
||||||
|
|||||||
@@ -232,9 +232,10 @@ class MipsService:
|
|||||||
for item in list(self._services.values()):
|
for item in list(self._services.values()):
|
||||||
if item['name'] != name:
|
if item['name'] != name:
|
||||||
continue
|
continue
|
||||||
service_data = self._services.pop(item['group_id'], {})
|
# Ignore mdns REMOVED package. Let the connection close by itself.
|
||||||
self.__call_service_change(
|
# service_data = self._services.pop(item['group_id'], {})
|
||||||
state=MipsServiceState.REMOVED, data=service_data)
|
# self.__call_service_change(
|
||||||
|
# state=MipsServiceState.REMOVED, data=service_data)
|
||||||
return
|
return
|
||||||
self._main_loop.create_task(
|
self._main_loop.create_task(
|
||||||
self.__request_service_info_async(zeroconf, service_type, name))
|
self.__request_service_info_async(zeroconf, service_type, name))
|
||||||
|
|||||||
@@ -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:
|
urn:miot-spec-v2:device:curtain:0000A00C:bjkcz-kczble:1:0000D031:
|
||||||
prop.2.2:
|
prop.2.2:
|
||||||
name: status-a
|
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:
|
urn:miot-spec-v2:device:electronic-valve:0000A0A7:sanmei-s1:1:
|
||||||
prop.3.1:
|
prop.3.1:
|
||||||
format: float
|
format: float
|
||||||
|
|||||||
Reference in New Issue
Block a user