solax-py-library 1.0.0.2508__py3-none-any.whl → 1.0.0.2509__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,9 +37,6 @@ class SmartSceneRunner:
37
37
  return False
38
38
 
39
39
  def smart_scene_handle(self, scene_instance):
40
- """smart scene的核心,判断是否满足条件并执行"""
41
- condition_types = set() # 记录需要判断的父条件类型,进行数据更新
42
- # for scene in scene_list:
43
40
  other_info = SmartSceneOtherInfo.parse_raw(scene_instance.other)
44
41
  try:
45
42
  scene_data = SmartSceneContent.parse_raw(scene_instance.content)
@@ -55,12 +52,6 @@ class SmartSceneRunner:
55
52
  f"场景名称: {scene_data.name}, 场景ID: {scene_id}, 判断类型: {scene_data.conditions.operation}:"
56
53
  )
57
54
 
58
- # 更新
59
- cur_condition_types = scene_data.get_condition_types() - condition_types
60
- if cur_condition_types:
61
- self._update_all_condition_data(cur_condition_types)
62
- condition_types |= cur_condition_types
63
-
64
55
  # 条件判断
65
56
  result = self._handle_conditions(
66
57
  scene_data.conditions.operation,
@@ -149,6 +140,6 @@ class SmartSceneRunner:
149
140
  ctx["cabinet"] = condition_info.cabinet
150
141
  return ctx
151
142
 
152
- def _update_all_condition_data(self, condition_types: Set[ConditionType]):
143
+ def update_all_condition_data(self, condition_types: Set[ConditionType]):
153
144
  for cond_type in condition_types:
154
145
  self.condition_class_map[cond_type].update_value()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: solax-py-library
3
- Version: 1.0.0.2508
3
+ Version: 1.0.0.2509
4
4
  Summary: some common tool
5
5
  Author: shenlvyu
6
6
  Author-email: 13296718439@163.com
@@ -27,7 +27,7 @@ solax_py_library/smart_scene/core/condition/price_condition.py,sha256=mzUnrMuG0D
27
27
  solax_py_library/smart_scene/core/condition/system_condition.py,sha256=g-5LSUAnu7JESUlTRbJ3MKm9cEMzofDZzNNm7_RSy10,1380
28
28
  solax_py_library/smart_scene/core/condition/weather_condition.py,sha256=OiKye007PZnocnmcrNQD6ObOEF7VyaYkdqz6D_2lNok,2236
29
29
  solax_py_library/smart_scene/core/service/__init__.py,sha256=4qoUm6NPOApn9hamW20oh5bL5cDo1AVjQ9qZtQVf6zM,65
30
- solax_py_library/smart_scene/core/service/run.py,sha256=mNbSmyvqSLPzRMnf3NN1Kt3gAkyfCLTsg4eGoMJrkXc,6174
30
+ solax_py_library/smart_scene/core/service/run.py,sha256=9hevnzI0wtp4Szxo_EQFeMm0_-iuq5gdmvjbgmyKOz0,5707
31
31
  solax_py_library/smart_scene/exceptions/__init__.py,sha256=lPMBWT7DDAsnvz_g2PX8jgEqr9bOrPa2x3UZ0SKvO0w,145
32
32
  solax_py_library/smart_scene/exceptions/price.py,sha256=3bnY6JzeEskUoXVzEs8bpg6hQzgbinBKY4GP4hBITWU,152
33
33
  solax_py_library/smart_scene/exceptions/smart_scene.py,sha256=lIwzjdpvtrAub4lyTQRD3h2sM95vF6gpUy3Nmq1w1k0,1778
@@ -73,6 +73,6 @@ solax_py_library/utils/cloud_client.py,sha256=5dZrc5fzrNFSXqTPZd7oHt-Y9Jj6RCigB7
73
73
  solax_py_library/utils/common.py,sha256=bfnZcX9uM-PjJrYAFv1UMmZgt6bGR7MaOd7jRPNHGxw,1238
74
74
  solax_py_library/utils/struct_util.py,sha256=4SKx5IyAke88PGHPHDK3OEDtyGHdapGoQ1BnGR0F2ts,913
75
75
  solax_py_library/utils/time_util.py,sha256=bY5kj9dmyOuLEQ6uYGQK7jU7y1RMiHZgevEKnkcQcSU,1461
76
- solax_py_library-1.0.0.2508.dist-info/METADATA,sha256=rtoh5cJp4jgYPpz1730YssCkooTr7XNhWjz9jFcEV4c,1827
77
- solax_py_library-1.0.0.2508.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
78
- solax_py_library-1.0.0.2508.dist-info/RECORD,,
76
+ solax_py_library-1.0.0.2509.dist-info/METADATA,sha256=Z1mbr2wt6filJOXO4rpQUuBH2uEEJjJdULIWrv8ycHU,1827
77
+ solax_py_library-1.0.0.2509.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
78
+ solax_py_library-1.0.0.2509.dist-info/RECORD,,