mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
update:设定iot操作默认值
This commit is contained in:
parent
519340dbf8
commit
df6440ab55
1 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ def create_iot_function(device_name, method_name, method_info):
|
|||
conn, response_success=None, response_failure=None, **params
|
||||
):
|
||||
try:
|
||||
# 设置默认响应消息
|
||||
if not response_success:
|
||||
response_success = "操作成功"
|
||||
if not response_failure:
|
||||
response_failure = "操作失败"
|
||||
|
||||
# 打印响应参数
|
||||
logger.bind(tag=TAG).info(
|
||||
f"控制函数接收到的响应参数: success='{response_success}', failure='{response_failure}'"
|
||||
|
|
|
|||
Loading…
Reference in a new issue