소스 검색

修改保存的场景数据条件的event_type为整型

locky 1 년 전
부모
커밋
8d43b5b8a1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Controller/SensorGateway/SmartSceneController.py

+ 1 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -1228,7 +1228,7 @@ class SmartSceneView(View):
                 condition['time_dict'] = time_dict
         else:
             device_type = int(conditions_dict['sensor']['device_type'])
-            event_type = conditions_dict['sensor']['eventValues'][0]['event_type']
+            event_type = int(conditions_dict['sensor']['eventValues'][0]['event_type'])
             condition['event_type'] = event_type
             # 温湿度传感器,取值
             if device_type == SENSOR_TYPE['tem_hum_sensor']: