ソースを参照

修复week转换问题

locky 1 年間 前
コミット
a87b1033a2
1 ファイル変更2 行追加2 行削除
  1. 2 2
      Controller/SensorGateway/SmartSceneController.py

+ 2 - 2
Controller/SensorGateway/SmartSceneController.py

@@ -1379,8 +1379,8 @@ class SmartSceneView(View):
         for i, bit in enumerate(bin_str):
             if bit == '1':
                 # 7 -> 0
-                week = i + next_day
-                if week == 7:
+                week = i + 1 + next_day
+                if week == 8:
                     week = 0
                 weeks += str(week) + ','
         # 删除最后一个逗号并返回结果