solax-py-library 1.0.0.46__py3-none-any.whl → 1.0.0.48__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.
- solax_py_library/smart_scene/core/condition/price_condition.py +2 -2
- solax_py_library/smart_scene/types/smart_scene_content.py +3 -3
- {solax_py_library-1.0.0.46.dist-info → solax_py_library-1.0.0.48.dist-info}/METADATA +1 -1
- {solax_py_library-1.0.0.46.dist-info → solax_py_library-1.0.0.48.dist-info}/RECORD +5 -5
- {solax_py_library-1.0.0.46.dist-info → solax_py_library-1.0.0.48.dist-info}/WHEEL +0 -0
@@ -38,7 +38,7 @@ class ElePriceCondition(BaseCondition):
|
|
38
38
|
return False
|
39
39
|
max_num = max(price[0:96])
|
40
40
|
if unit == SmartSceneUnit.NUM: # 比最高电价低X元
|
41
|
-
base = max_num - value
|
41
|
+
base = round(max_num - value, 4)
|
42
42
|
else: # 比最高电价低X%
|
43
43
|
if max_num < 0:
|
44
44
|
base = round(max_num * (1 + value / 100), 4)
|
@@ -57,7 +57,7 @@ class ElePriceCondition(BaseCondition):
|
|
57
57
|
return False
|
58
58
|
min_num = min(price[0:96])
|
59
59
|
if unit == SmartSceneUnit.NUM: # 比最低电价高X元
|
60
|
-
base = min_num + value
|
60
|
+
base = round(min_num + value, 4)
|
61
61
|
else: # 比最低电价高X%
|
62
62
|
if min_num < 0:
|
63
63
|
base = round(min_num * (1 - value / 100), 4)
|
@@ -88,8 +88,8 @@ class SmartSceneContent(BaseModel):
|
|
88
88
|
{
|
89
89
|
"childType": PriceConditionType.price,
|
90
90
|
"childData": {
|
91
|
-
"function": ConditionFunc.
|
92
|
-
"data": [
|
91
|
+
"function": ConditionFunc.LT,
|
92
|
+
"data": [0],
|
93
93
|
},
|
94
94
|
}
|
95
95
|
],
|
@@ -126,7 +126,7 @@ class SmartSceneContent(BaseModel):
|
|
126
126
|
"childType": PriceConditionType.price,
|
127
127
|
"childData": {
|
128
128
|
"function": ConditionFunc.LT,
|
129
|
-
"data": [
|
129
|
+
"data": [0],
|
130
130
|
},
|
131
131
|
}
|
132
132
|
],
|
@@ -24,7 +24,7 @@ solax_py_library/smart_scene/core/condition/__init__.py,sha256=1nN-N52Oq7LKdn6Ap
|
|
24
24
|
solax_py_library/smart_scene/core/condition/base.py,sha256=saj7dc0Su2Wi_Lx04cesHFgIPDyQUwvHuDElcaDOIHU,596
|
25
25
|
solax_py_library/smart_scene/core/condition/cabinet_condition.py,sha256=Umum_DvUo6xQDqci4SyiFXw8mpNrkn4l2HdZ4XPVC8c,2039
|
26
26
|
solax_py_library/smart_scene/core/condition/date_condition.py,sha256=ipJo8hvAgeANEwYUSa_O2j4ORc-xhDrJOSuQDMa8-9M,948
|
27
|
-
solax_py_library/smart_scene/core/condition/price_condition.py,sha256=
|
27
|
+
solax_py_library/smart_scene/core/condition/price_condition.py,sha256=jNafwWzCigRhhWcdoR8zQ4WU_O7cGghemZXCp4-n6pQ,4565
|
28
28
|
solax_py_library/smart_scene/core/condition/system_condition.py,sha256=lEC0N7pZolRkYRcuDfer5jZIvzOGe2ej4oBDlRD8OLQ,1734
|
29
29
|
solax_py_library/smart_scene/core/condition/weather_condition.py,sha256=PkHxQzHwJLZiMsLL4xW8zvghRoQ32TV3vzkNyoF82Ak,2684
|
30
30
|
solax_py_library/smart_scene/core/service/__init__.py,sha256=wWzHSN2XaHnI-TNtCJWWRHnNC7s3-2GNQo9y0K_PC4Q,69
|
@@ -38,7 +38,7 @@ solax_py_library/smart_scene/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
38
38
|
solax_py_library/smart_scene/types/action.py,sha256=UaIwwXDaWVYrcEtJfh7g2jTtFDMz2T1RQQ7VdphTMBs,12934
|
39
39
|
solax_py_library/smart_scene/types/condition.py,sha256=mdO18M7jgZr3R2FcwoqOSSvP71OqkXYhQ2Q1Wp55z9w,9813
|
40
40
|
solax_py_library/smart_scene/types/condition_value.py,sha256=O1q4Hd2o2WHj5DXWzgiTP_EcEIVzAw2gKVdE6I1efRA,1477
|
41
|
-
solax_py_library/smart_scene/types/smart_scene_content.py,sha256=
|
41
|
+
solax_py_library/smart_scene/types/smart_scene_content.py,sha256=zDpwNp1bZJfKZjur4-K_RfK795Njs_CPuE0FjNh1FKM,6073
|
42
42
|
solax_py_library/snap_shot/__init__.py,sha256=Ex12q6BCkdU-3OP-f-ehGCetJJWnoZ7KxhEDd_lXh6M,81
|
43
43
|
solax_py_library/snap_shot/constant/__init__.py,sha256=UNfjAlx1wovXc1oH74af9oIe2TljwCCiTzNXzWgtUms,65
|
44
44
|
solax_py_library/snap_shot/constant/crc_table.py,sha256=D-pSxpf1XDzu7YR8LmbnzdLRvI8exDL2dyDh7RRc4Io,3566
|
@@ -79,6 +79,6 @@ solax_py_library/utils/cloud_client.py,sha256=5dZrc5fzrNFSXqTPZd7oHt-Y9Jj6RCigB7
|
|
79
79
|
solax_py_library/utils/common.py,sha256=bfnZcX9uM-PjJrYAFv1UMmZgt6bGR7MaOd7jRPNHGxw,1238
|
80
80
|
solax_py_library/utils/struct_util.py,sha256=pL6L80GXIHasy1ZDIj89-5BzXW1BWI3TPitH7thGGIE,1577
|
81
81
|
solax_py_library/utils/time_util.py,sha256=bY5kj9dmyOuLEQ6uYGQK7jU7y1RMiHZgevEKnkcQcSU,1461
|
82
|
-
solax_py_library-1.0.0.
|
83
|
-
solax_py_library-1.0.0.
|
84
|
-
solax_py_library-1.0.0.
|
82
|
+
solax_py_library-1.0.0.48.dist-info/METADATA,sha256=S4bMSXWf0ganvDEMaXCYsMWKMAyY68Q3i2-89lGYZSc,1825
|
83
|
+
solax_py_library-1.0.0.48.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
84
|
+
solax_py_library-1.0.0.48.dist-info/RECORD,,
|
File without changes
|