Эх сурвалжийг харах

添加智能场景接口修改发送设备数据类型

peng 3 жил өмнө
parent
commit
ef5136f956

+ 1 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -258,7 +258,7 @@ class SmartSceneView(View):
                     msg['scene_status'] = 1
                     msg['sensor_type'] = conditions_dict['sensor']['device_type']
                     msg['sensor_src'] = int(sub_device_qs['src_addr'], 16)
-                    msg['sensor_status'] = conditions_dict['sensor']['eventValues'][0]['value']
+                    msg['sensor_status'] = int(conditions_dict['sensor']['eventValues'][0]['value'])
 
                 task_list = []
                 for task in tasks_list: