Compare commits

...

4 Commits

Author SHA1 Message Date
Li Shuzhen
e60bf35d91
Merge fe856abf56 into b40d357230 2025-12-31 09:58:39 +08:00
Li Shuzhen
b40d357230
fix: update mesh offline state (#1579)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-31 09:58:29 +08:00
LiShuzhen
fe856abf56 fix: the playing-state property's access field of xiaomi.wifispeaker.x08c 2025-12-23 09:01:33 +08:00
LiShuzhen
b96942f05b fix: the playing-state property's access field of xiaomi.wifispeaker.lx04 and xiaomi.wifispeaker.lx06 (#1566) 2025-12-18 17:59:37 +08:00
2 changed files with 18 additions and 1 deletions

View File

@ -1527,6 +1527,8 @@ class MIoTClient:
if did not in filter_dids:
continue
device_old = self._device_list_gateway.get(did, None)
gw_state_old = device_old.get(
'online', False) if device_old else False
gw_state_new: bool = False
device_new = gw_list.pop(did, None)
if device_new:
@ -1540,7 +1542,7 @@ class MIoTClient:
device_old['online'] = False
# Update cache group_id
info['group_id'] = group_id
if not gw_state_new:
if (gw_state_old == gw_state_new) and (not gw_state_new):
continue
self.__update_device_msg_sub(did=did)
state_old: Optional[bool] = info.get('online', None)

View File

@ -499,6 +499,21 @@ urn:miot-spec-v2:device:safe-box:0000A042:loock-v1:1:
prop.5.1:
name: contact-state
expr: (src_value!=1)
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx04:2:
prop.3.1:
access:
- read
- notify
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx06:2:
prop.3.1:
access:
- read
- notify
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-x08c:2:
prop.2.1:
access:
- read
- notify
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-x08e:1:
prop.3.1:
name: playing-state-a