浏览代码

添加智能场景接口修改判断conditions类型

peng 3 年之前
父节点
当前提交
c3daa5de41
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/SensorGateway/SmartSceneController.py

+ 1 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -251,7 +251,7 @@ class SmartSceneView(View):
                     return response.json(444, {'error param': 'invalid isAllDay'})
 
                 msg = {}
-                if conditions_dict['type'] == '2':
+                if conditions_dict['type'] == 2:
                     sub_device_id = conditions_dict['sensor']['subDeviceId']
                     sub_device_qs = GatewaySubDevice.objects.filter(id=sub_device_id).values('src_addr').first()
                     msg['smart_scene_id'] = smart_scene_qs.id