Explorar el Código

增加智能插座判断

zhangdongming hace 2 años
padre
commit
da1becaa83
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Controller/SensorGateway/EquipmentFamilyController.py

+ 1 - 1
Controller/SensorGateway/EquipmentFamilyController.py

@@ -773,7 +773,7 @@ class EquipmentFamilyView(View):
             'created_time': now_time
             'created_time': now_time
         }
         }
 
 
-        category = 0 if device_type == 200 or 201 else 1
+        category = 0 if device_type == 200 or device_type == 201 else 1
         data['category'] = category
         data['category'] = category
         # 查询类别排序
         # 查询类别排序
         family_room_device_qs = FamilyRoomDevice.objects.filter(family_id=int(family_id), category=category).values(
         family_room_device_qs = FamilyRoomDevice.objects.filter(family_id=int(family_id), category=category).values(