Merge branch 'XiaoMi:main' into main

This commit is contained in:
ted
2025-02-28 20:20:55 +08:00
committed by GitHub
4 changed files with 29 additions and 6 deletions

View File

@ -25,7 +25,7 @@
"cryptography",
"psutil"
],
"version": "v0.1.5b2",
"version": "v0.2.0",
"zeroconf": [
"_miot-central._tcp.local."
]

View File

@ -1213,10 +1213,12 @@ class MipsLocalClient(_MipsClient):
or 'did' not in msg
or 'siid' not in msg
or 'eiid' not in msg
or 'arguments' not in msg
# or 'arguments' not in msg
):
# self.log_error(f'on_event_msg, recv unknown msg, {payload}')
return
if 'arguments' not in msg:
msg['arguments'] = []
if handler:
self.log_debug('local, on event_occurred, %s', payload)
handler(msg, ctx)

View File

@ -546,7 +546,7 @@ class MIoTSpecProperty(_MIoTSpecBase):
self.unit = unit
self.value_range = value_range
self.value_list = value_list
self.precision = precision or 1
self.precision = precision if precision is not None else 1
self.expr = expr
self.spec_id = hash(