Merge pull request #1049 from xinnan-tech/py_update

update:完成Python部分的“动态更新web端的配置”
This commit is contained in:
Sakura-RanChen
2025-04-29 10:39:21 +08:00
committed by GitHub
2 changed files with 27 additions and 0 deletions
@@ -61,5 +61,8 @@ async def handleTextMessage(conn, message):
asyncio.create_task(handleIotDescriptors(conn, msg_json["descriptors"]))
if "states" in msg_json:
asyncio.create_task(handleIotStatus(conn, msg_json["states"]))
elif msg_json["type"] == "server":
if "model" in msg_json:
await conn.handle_config_update(msg_json)
except json.JSONDecodeError:
await conn.websocket.send(message)