mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-31 03:43:57 +08:00
udpate:增加iot消息properties和methods可能为空的情况 (#851)
* update:测试页面增加OTA地址 * update:兼容旧设备,无Client-Id的情况 * update:修复智控台下发配置布尔类型转换出错bug * update:修复智控台下发配置字符类型转换出错bug * udpate:增加iot消息properties和methods可能为空的情况
This commit is contained in:
@@ -144,6 +144,7 @@ class IotDescriptor:
|
||||
self.methods = []
|
||||
|
||||
# 根据描述创建属性
|
||||
if properties is not None:
|
||||
for key, value in properties.items():
|
||||
property_item = globals()[key] = {}
|
||||
property_item["name"] = key
|
||||
@@ -157,6 +158,7 @@ class IotDescriptor:
|
||||
self.properties.append(property_item)
|
||||
|
||||
# 根据描述创建方法
|
||||
if methods is not None:
|
||||
for key, value in methods.items():
|
||||
method = globals()[key] = {}
|
||||
method["description"] = value["description"]
|
||||
|
||||
Reference in New Issue
Block a user