node-red-contrib-power-saver 3.5.6 → 3.6.1

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.
Files changed (42) hide show
  1. package/docs/.vuepress/config.js +1 -0
  2. package/docs/changelog/README.md +15 -0
  3. package/docs/examples/example-grid-tariff-capacity-part.md +272 -0
  4. package/docs/images/lowest-price-config.png +0 -0
  5. package/docs/nodes/ps-general-add-tariff.md +15 -1
  6. package/docs/nodes/ps-strategy-best-save.md +4 -2
  7. package/docs/nodes/ps-strategy-lowest-price.md +27 -13
  8. package/package.json +2 -1
  9. package/src/elvia/elvia-add-tariff.html +1 -1
  10. package/src/elvia/elvia-add-tariff.js +4 -2
  11. package/src/general-add-tariff-functions.js +3 -1
  12. package/src/general-add-tariff.html +54 -3
  13. package/src/general-add-tariff.js +1 -0
  14. package/src/power-saver.html +1 -1
  15. package/src/receive-price.html +1 -1
  16. package/src/strategy-best-save-functions.js +5 -1
  17. package/src/strategy-best-save.html +1 -1
  18. package/src/strategy-heat-capacitor.html +1 -3
  19. package/src/strategy-lowest-price.html +13 -1
  20. package/src/strategy-lowest-price.js +11 -2
  21. package/src/utils.js +5 -2
  22. package/test/data/best-save-overlap-prices.json +197 -0
  23. package/test/data/best-save-overlap-result.json +357 -0
  24. package/test/data/lowest-price-result-cont-max-fail.json +14 -0
  25. package/test/data/lowest-price-result-cont-max.json +20 -0
  26. package/test/data/lowest-price-result-cont.json +6 -5
  27. package/test/data/lowest-price-result-missing-end.json +7 -3
  28. package/test/data/lowest-price-result-split-allday.json +9 -8
  29. package/test/data/lowest-price-result-split-allday10.json +8 -7
  30. package/test/data/lowest-price-result-split-max.json +22 -0
  31. package/test/data/lowest-price-result-split.json +8 -7
  32. package/test/data/nordpool-3-days-result.json +10 -5
  33. package/test/data/result.js +9 -0
  34. package/test/data/tibber-result-end-0-24h.json +9 -4
  35. package/test/data/tibber-result-end-0.json +5 -2
  36. package/test/data/tibber-result.json +28 -14
  37. package/test/general-add-tariff-functions.test.js +2 -0
  38. package/test/general-add-tariff.test.js +40 -1
  39. package/test/power-saver.test.js +6 -0
  40. package/test/strategy-best-save-overlap.test.js +52 -0
  41. package/test/strategy-lowest-price.test.js +88 -31
  42. package/test/utils.test.js +9 -8
@@ -43,6 +43,14 @@
43
43
  value: "12",
44
44
  required: true,
45
45
  },
46
+ maxPrice: {
47
+ value: null,
48
+ required: false,
49
+ validate: function (v) {
50
+ console.log("validating " + v);
51
+ return v == null || v == "" || (!isNaN(parseFloat(v)) && isFinite(v));
52
+ },
53
+ },
46
54
  doNotSplit: {
47
55
  value: "false",
48
56
  required: true,
@@ -145,6 +153,10 @@
145
153
  <label for="node-input-hoursOn"><i class="fa fa-arrows-h"></i> Hours on</label>
146
154
  <input type="text" id="node-input-hoursOn" style="width: 80px">
147
155
  </div>
156
+ <div class="form-row">
157
+ <label for="node-input-maxPrice"><i class="fa fa-minus"></i> Max price</label>
158
+ <input type="text" id="node-input-maxPrice" placeholder="Max price" style="width: 80px">
159
+ </div>
148
160
  <div class="form-row">
149
161
  <label for="node-input-doNotSplit">Consecutive on-period</label>
150
162
  <input type="checkbox" id="node-input-doNotSplit" style="display:inline-block; width:22px; vertical-align:top;">
@@ -177,5 +189,5 @@
177
189
  <script type="text/markdown" data-help-name="ps-strategy-lowest-price">
178
190
  A node to turn on a switch the hours when the price is lowest.
179
191
 
180
- Please read more in the [node documentation](https://ottopaulsen.github.io/node-red-contrib-power-saver/nodes/ps-strategy-lowest-price)
192
+ Please read more in the [node documentation](https://powersaver.no/nodes/ps-strategy-lowest-price)
181
193
  </script>
@@ -13,6 +13,7 @@ module.exports = function (RED) {
13
13
  fromTime: config.fromTime,
14
14
  toTime: config.toTime,
15
15
  hoursOn: parseInt(config.hoursOn),
16
+ maxPrice: config.maxPrice == null || config.maxPrice == "" ? null : parseFloat(config.maxPrice),
16
17
  doNotSplit: booleanConfig(config.doNotSplit),
17
18
  sendCurrentValueWhenRescheduling: booleanConfig(config.sendCurrentValueWhenRescheduling),
18
19
  outputIfNoSchedule: booleanConfig(config.outputIfNoSchedule),
@@ -22,7 +23,6 @@ module.exports = function (RED) {
22
23
  node.context().set("config", originalConfig);
23
24
  node.contextStorage = originalConfig.contextStorage;
24
25
 
25
-
26
26
  node.on("close", function () {
27
27
  clearTimeout(node.schedulingTimeout);
28
28
  });
@@ -123,8 +123,17 @@ function makePlan(node, values, onOff, fromIndex, toIndex) {
123
123
  const res = node.doNotSplit
124
124
  ? getBestContinuous(valuesInPeriod, node.hoursOn)
125
125
  : getBestX(valuesInPeriod, node.hoursOn);
126
+ const sumPriceOn = res.reduce((p, v, i) => {
127
+ return p + (v ? valuesInPeriod[i] : 0);
128
+ }, 0);
129
+ const average = sumPriceOn / node.hoursOn;
126
130
  res.forEach((v, i) => {
127
- onOff[fromIndex + i] = v;
131
+ onOff[fromIndex + i] =
132
+ node.maxPrice == null
133
+ ? v
134
+ : node.doNotSplit
135
+ ? v && average <= node.maxPrice
136
+ : v && valuesInPeriod[i] <= node.maxPrice;
128
137
  });
129
138
  return onOff;
130
139
  }
package/src/utils.js CHANGED
@@ -138,13 +138,16 @@ function countAtEnd(arr, value) {
138
138
  function makeSchedule(onOff, startTimes, initial = null) {
139
139
  const res = [];
140
140
  let prev = initial;
141
+ let prevRecord;
141
142
  for (let i = 0; i < startTimes.length; i++) {
142
143
  const value = onOff[i];
143
- if (value !== prev) {
144
+ if (value !== prev || i === 0) {
144
145
  const time = startTimes[i];
145
- res.push({ time, value });
146
+ prevRecord = { time, value, countHours: 0 };
147
+ res.push(prevRecord);
146
148
  prev = value;
147
149
  }
150
+ prevRecord.countHours++;
148
151
  }
149
152
  return res;
150
153
  }
@@ -0,0 +1,197 @@
1
+ {
2
+ "source": "Tibber",
3
+ "priceData": [
4
+ {
5
+ "value": 5.5759,
6
+ "start": "2022-08-16T00:00:00.000+02:00"
7
+ },
8
+ {
9
+ "value": 5.1618,
10
+ "start": "2022-08-16T01:00:00.000+02:00"
11
+ },
12
+ {
13
+ "value": 5.1653,
14
+ "start": "2022-08-16T02:00:00.000+02:00"
15
+ },
16
+ {
17
+ "value": 4.9917,
18
+ "start": "2022-08-16T03:00:00.000+02:00"
19
+ },
20
+ {
21
+ "value": 5.0654,
22
+ "start": "2022-08-16T04:00:00.000+02:00"
23
+ },
24
+ {
25
+ "value": 5.2855,
26
+ "start": "2022-08-16T05:00:00.000+02:00"
27
+ },
28
+ {
29
+ "value": 5.3179,
30
+ "start": "2022-08-16T06:00:00.000+02:00"
31
+ },
32
+ {
33
+ "value": 5.7233,
34
+ "start": "2022-08-16T07:00:00.000+02:00"
35
+ },
36
+ {
37
+ "value": 5.8856,
38
+ "start": "2022-08-16T08:00:00.000+02:00"
39
+ },
40
+ {
41
+ "value": 5.6756,
42
+ "start": "2022-08-16T09:00:00.000+02:00"
43
+ },
44
+ {
45
+ "value": 5.5708,
46
+ "start": "2022-08-16T10:00:00.000+02:00"
47
+ },
48
+ {
49
+ "value": 5.424,
50
+ "start": "2022-08-16T11:00:00.000+02:00"
51
+ },
52
+ {
53
+ "value": 5.3128,
54
+ "start": "2022-08-16T12:00:00.000+02:00"
55
+ },
56
+ {
57
+ "value": 5.2237,
58
+ "start": "2022-08-16T13:00:00.000+02:00"
59
+ },
60
+ {
61
+ "value": 5.224,
62
+ "start": "2022-08-16T14:00:00.000+02:00"
63
+ },
64
+ {
65
+ "value": 5.2958,
66
+ "start": "2022-08-16T15:00:00.000+02:00"
67
+ },
68
+ {
69
+ "value": 5.4854,
70
+ "start": "2022-08-16T16:00:00.000+02:00"
71
+ },
72
+ {
73
+ "value": 5.77,
74
+ "start": "2022-08-16T17:00:00.000+02:00"
75
+ },
76
+ {
77
+ "value": 5.9207,
78
+ "start": "2022-08-16T18:00:00.000+02:00"
79
+ },
80
+ {
81
+ "value": 5.9163,
82
+ "start": "2022-08-16T19:00:00.000+02:00"
83
+ },
84
+ {
85
+ "value": 5.8926,
86
+ "start": "2022-08-16T20:00:00.000+02:00"
87
+ },
88
+ {
89
+ "value": 5.8729,
90
+ "start": "2022-08-16T21:00:00.000+02:00"
91
+ },
92
+ {
93
+ "value": 5.871,
94
+ "start": "2022-08-16T22:00:00.000+02:00"
95
+ },
96
+ {
97
+ "value": 5.7373,
98
+ "start": "2022-08-16T23:00:00.000+02:00"
99
+ },
100
+ {
101
+ "value": 6.0164,
102
+ "start": "2022-08-17T00:00:00.000+02:00"
103
+ },
104
+ {
105
+ "value": 5.7825,
106
+ "start": "2022-08-17T01:00:00.000+02:00"
107
+ },
108
+ {
109
+ "value": 5.6423,
110
+ "start": "2022-08-17T02:00:00.000+02:00"
111
+ },
112
+ {
113
+ "value": 5.4882,
114
+ "start": "2022-08-17T03:00:00.000+02:00"
115
+ },
116
+ {
117
+ "value": 5.5498,
118
+ "start": "2022-08-17T04:00:00.000+02:00"
119
+ },
120
+ {
121
+ "value": 5.718,
122
+ "start": "2022-08-17T05:00:00.000+02:00"
123
+ },
124
+ {
125
+ "value": 5.7206,
126
+ "start": "2022-08-17T06:00:00.000+02:00"
127
+ },
128
+ {
129
+ "value": 5.9987,
130
+ "start": "2022-08-17T07:00:00.000+02:00"
131
+ },
132
+ {
133
+ "value": 6.2019,
134
+ "start": "2022-08-17T08:00:00.000+02:00"
135
+ },
136
+ {
137
+ "value": 6.5776,
138
+ "start": "2022-08-17T09:00:00.000+02:00"
139
+ },
140
+ {
141
+ "value": 6.5709,
142
+ "start": "2022-08-17T10:00:00.000+02:00"
143
+ },
144
+ {
145
+ "value": 6.2955,
146
+ "start": "2022-08-17T11:00:00.000+02:00"
147
+ },
148
+ {
149
+ "value": 6.0833,
150
+ "start": "2022-08-17T12:00:00.000+02:00"
151
+ },
152
+ {
153
+ "value": 5.9871,
154
+ "start": "2022-08-17T13:00:00.000+02:00"
155
+ },
156
+ {
157
+ "value": 5.9045,
158
+ "start": "2022-08-17T14:00:00.000+02:00"
159
+ },
160
+ {
161
+ "value": 6.0756,
162
+ "start": "2022-08-17T15:00:00.000+02:00"
163
+ },
164
+ {
165
+ "value": 6.4711,
166
+ "start": "2022-08-17T16:00:00.000+02:00"
167
+ },
168
+ {
169
+ "value": 6.5347,
170
+ "start": "2022-08-17T17:00:00.000+02:00"
171
+ },
172
+ {
173
+ "value": 6.4604,
174
+ "start": "2022-08-17T18:00:00.000+02:00"
175
+ },
176
+ {
177
+ "value": 6.4911,
178
+ "start": "2022-08-17T19:00:00.000+02:00"
179
+ },
180
+ {
181
+ "value": 6.4908,
182
+ "start": "2022-08-17T20:00:00.000+02:00"
183
+ },
184
+ {
185
+ "value": 6.3622,
186
+ "start": "2022-08-17T21:00:00.000+02:00"
187
+ },
188
+ {
189
+ "value": 6.5796,
190
+ "start": "2022-08-17T22:00:00.000+02:00"
191
+ },
192
+ {
193
+ "value": 6.0813,
194
+ "start": "2022-08-17T23:00:00.000+02:00"
195
+ }
196
+ ]
197
+ }
@@ -0,0 +1,357 @@
1
+ {
2
+ "schedule": [
3
+ {
4
+ "time": "2022-08-16T00:00:00.000+02:00",
5
+ "value": false,
6
+ "countHours": 3
7
+ },
8
+ {
9
+ "time": "2022-08-16T03:00:00.000+02:00",
10
+ "value": true,
11
+ "countHours": 2
12
+ },
13
+ {
14
+ "time": "2022-08-16T05:00:00.000+02:00",
15
+ "value": false,
16
+ "countHours": 8
17
+ },
18
+ {
19
+ "time": "2022-08-16T13:00:00.000+02:00",
20
+ "value": true,
21
+ "countHours": 4
22
+ },
23
+ {
24
+ "time": "2022-08-16T17:00:00.000+02:00",
25
+ "value": false,
26
+ "countHours": 10
27
+ },
28
+ {
29
+ "time": "2022-08-17T03:00:00.000+02:00",
30
+ "value": true,
31
+ "countHours": 4
32
+ },
33
+ {
34
+ "time": "2022-08-17T07:00:00.000+02:00",
35
+ "value": false,
36
+ "countHours": 7
37
+ },
38
+ {
39
+ "time": "2022-08-17T14:00:00.000+02:00",
40
+ "value": true,
41
+ "countHours": 2
42
+ },
43
+ {
44
+ "time": "2022-08-17T16:00:00.000+02:00",
45
+ "value": false,
46
+ "countHours": 7
47
+ },
48
+ {
49
+ "time": "2022-08-17T23:00:00.000+02:00",
50
+ "value": true,
51
+ "countHours": 1
52
+ }
53
+ ],
54
+ "hours": [
55
+ {
56
+ "price": 5.5759,
57
+ "onOff": false,
58
+ "start": "2022-08-16T00:00:00.000+02:00",
59
+ "saving": 0.5842
60
+ },
61
+ {
62
+ "price": 5.1618,
63
+ "onOff": false,
64
+ "start": "2022-08-16T01:00:00.000+02:00",
65
+ "saving": 0.1701
66
+ },
67
+ {
68
+ "price": 5.1653,
69
+ "onOff": false,
70
+ "start": "2022-08-16T02:00:00.000+02:00",
71
+ "saving": 0.1736
72
+ },
73
+ {
74
+ "price": 4.9917,
75
+ "onOff": true,
76
+ "start": "2022-08-16T03:00:00.000+02:00",
77
+ "saving": null
78
+ },
79
+ {
80
+ "price": 5.0654,
81
+ "onOff": true,
82
+ "start": "2022-08-16T04:00:00.000+02:00",
83
+ "saving": null
84
+ },
85
+ {
86
+ "price": 5.2855,
87
+ "onOff": false,
88
+ "start": "2022-08-16T05:00:00.000+02:00",
89
+ "saving": 0.0618
90
+ },
91
+ {
92
+ "price": 5.3179,
93
+ "onOff": false,
94
+ "start": "2022-08-16T06:00:00.000+02:00",
95
+ "saving": 0.0942
96
+ },
97
+ {
98
+ "price": 5.7233,
99
+ "onOff": false,
100
+ "start": "2022-08-16T07:00:00.000+02:00",
101
+ "saving": 0.4996
102
+ },
103
+ {
104
+ "price": 5.8856,
105
+ "onOff": false,
106
+ "start": "2022-08-16T08:00:00.000+02:00",
107
+ "saving": 0.6619
108
+ },
109
+ {
110
+ "price": 5.6756,
111
+ "onOff": false,
112
+ "start": "2022-08-16T09:00:00.000+02:00",
113
+ "saving": 0.4519
114
+ },
115
+ {
116
+ "price": 5.5708,
117
+ "onOff": false,
118
+ "start": "2022-08-16T10:00:00.000+02:00",
119
+ "saving": 0.3471
120
+ },
121
+ {
122
+ "price": 5.424,
123
+ "onOff": false,
124
+ "start": "2022-08-16T11:00:00.000+02:00",
125
+ "saving": 0.2003
126
+ },
127
+ {
128
+ "price": 5.3128,
129
+ "onOff": false,
130
+ "start": "2022-08-16T12:00:00.000+02:00",
131
+ "saving": 0.0891
132
+ },
133
+ {
134
+ "price": 5.2237,
135
+ "onOff": true,
136
+ "start": "2022-08-16T13:00:00.000+02:00",
137
+ "saving": null
138
+ },
139
+ {
140
+ "price": 5.224,
141
+ "onOff": true,
142
+ "start": "2022-08-16T14:00:00.000+02:00",
143
+ "saving": null
144
+ },
145
+ {
146
+ "price": 5.2958,
147
+ "onOff": true,
148
+ "start": "2022-08-16T15:00:00.000+02:00",
149
+ "saving": null
150
+ },
151
+ {
152
+ "price": 5.4854,
153
+ "onOff": true,
154
+ "start": "2022-08-16T16:00:00.000+02:00",
155
+ "saving": null
156
+ },
157
+ {
158
+ "price": 5.77,
159
+ "onOff": false,
160
+ "start": "2022-08-16T17:00:00.000+02:00",
161
+ "saving": 0.2818
162
+ },
163
+ {
164
+ "price": 5.9207,
165
+ "onOff": false,
166
+ "start": "2022-08-16T18:00:00.000+02:00",
167
+ "saving": 0.4325
168
+ },
169
+ {
170
+ "price": 5.9163,
171
+ "onOff": false,
172
+ "start": "2022-08-16T19:00:00.000+02:00",
173
+ "saving": 0.4281
174
+ },
175
+ {
176
+ "price": 5.8926,
177
+ "onOff": false,
178
+ "start": "2022-08-16T20:00:00.000+02:00",
179
+ "saving": 0.4044
180
+ },
181
+ {
182
+ "price": 5.8729,
183
+ "onOff": false,
184
+ "start": "2022-08-16T21:00:00.000+02:00",
185
+ "saving": 0.3847
186
+ },
187
+ {
188
+ "price": 5.871,
189
+ "onOff": false,
190
+ "start": "2022-08-16T22:00:00.000+02:00",
191
+ "saving": 0.3828
192
+ },
193
+ {
194
+ "price": 5.7373,
195
+ "onOff": false,
196
+ "start": "2022-08-16T23:00:00.000+02:00",
197
+ "saving": 0.2491
198
+ },
199
+ {
200
+ "price": 6.0164,
201
+ "onOff": false,
202
+ "start": "2022-08-17T00:00:00.000+02:00",
203
+ "saving": 0.5282
204
+ },
205
+ {
206
+ "price": 5.7825,
207
+ "onOff": false,
208
+ "start": "2022-08-17T01:00:00.000+02:00",
209
+ "saving": 0.2943
210
+ },
211
+ {
212
+ "price": 5.6423,
213
+ "onOff": false,
214
+ "start": "2022-08-17T02:00:00.000+02:00",
215
+ "saving": 0.1541
216
+ },
217
+ {
218
+ "price": 5.4882,
219
+ "onOff": true,
220
+ "start": "2022-08-17T03:00:00.000+02:00",
221
+ "saving": null
222
+ },
223
+ {
224
+ "price": 5.5498,
225
+ "onOff": true,
226
+ "start": "2022-08-17T04:00:00.000+02:00",
227
+ "saving": null
228
+ },
229
+ {
230
+ "price": 5.718,
231
+ "onOff": true,
232
+ "start": "2022-08-17T05:00:00.000+02:00",
233
+ "saving": null
234
+ },
235
+ {
236
+ "price": 5.7206,
237
+ "onOff": true,
238
+ "start": "2022-08-17T06:00:00.000+02:00",
239
+ "saving": null
240
+ },
241
+ {
242
+ "price": 5.9987,
243
+ "onOff": false,
244
+ "start": "2022-08-17T07:00:00.000+02:00",
245
+ "saving": 0.0942
246
+ },
247
+ {
248
+ "price": 6.2019,
249
+ "onOff": false,
250
+ "start": "2022-08-17T08:00:00.000+02:00",
251
+ "saving": 0.2974
252
+ },
253
+ {
254
+ "price": 6.5776,
255
+ "onOff": false,
256
+ "start": "2022-08-17T09:00:00.000+02:00",
257
+ "saving": 0.6731
258
+ },
259
+ {
260
+ "price": 6.5709,
261
+ "onOff": false,
262
+ "start": "2022-08-17T10:00:00.000+02:00",
263
+ "saving": 0.6664
264
+ },
265
+ {
266
+ "price": 6.2955,
267
+ "onOff": false,
268
+ "start": "2022-08-17T11:00:00.000+02:00",
269
+ "saving": 0.391
270
+ },
271
+ {
272
+ "price": 6.0833,
273
+ "onOff": false,
274
+ "start": "2022-08-17T12:00:00.000+02:00",
275
+ "saving": 0.1788
276
+ },
277
+ {
278
+ "price": 5.9871,
279
+ "onOff": false,
280
+ "start": "2022-08-17T13:00:00.000+02:00",
281
+ "saving": 0.0826
282
+ },
283
+ {
284
+ "price": 5.9045,
285
+ "onOff": true,
286
+ "start": "2022-08-17T14:00:00.000+02:00",
287
+ "saving": null
288
+ },
289
+ {
290
+ "price": 6.0756,
291
+ "onOff": true,
292
+ "start": "2022-08-17T15:00:00.000+02:00",
293
+ "saving": null
294
+ },
295
+ {
296
+ "price": 6.4711,
297
+ "onOff": false,
298
+ "start": "2022-08-17T16:00:00.000+02:00",
299
+ "saving": 0.3898
300
+ },
301
+ {
302
+ "price": 6.5347,
303
+ "onOff": false,
304
+ "start": "2022-08-17T17:00:00.000+02:00",
305
+ "saving": 0.4534
306
+ },
307
+ {
308
+ "price": 6.4604,
309
+ "onOff": false,
310
+ "start": "2022-08-17T18:00:00.000+02:00",
311
+ "saving": 0.3791
312
+ },
313
+ {
314
+ "price": 6.4911,
315
+ "onOff": false,
316
+ "start": "2022-08-17T19:00:00.000+02:00",
317
+ "saving": 0.4098
318
+ },
319
+ {
320
+ "price": 6.4908,
321
+ "onOff": false,
322
+ "start": "2022-08-17T20:00:00.000+02:00",
323
+ "saving": 0.4095
324
+ },
325
+ {
326
+ "price": 6.3622,
327
+ "onOff": false,
328
+ "start": "2022-08-17T21:00:00.000+02:00",
329
+ "saving": 0.2809
330
+ },
331
+ {
332
+ "price": 6.5796,
333
+ "onOff": false,
334
+ "start": "2022-08-17T22:00:00.000+02:00",
335
+ "saving": 0.4983
336
+ },
337
+ {
338
+ "price": 6.0813,
339
+ "onOff": true,
340
+ "start": "2022-08-17T23:00:00.000+02:00",
341
+ "saving": null
342
+ }
343
+ ],
344
+ "source": "Tibber",
345
+ "config": {
346
+ "maxHoursToSaveInSequence": 12,
347
+ "minHoursOnAfterMaxSequenceSaved": 1,
348
+ "minSaving": 0.01,
349
+ "sendCurrentValueWhenRescheduling": true,
350
+ "outputIfNoSchedule": false,
351
+ "contextStorage": "default"
352
+ },
353
+ "sentOnCommand": false,
354
+ "time": "2022-08-16T17:14:35.673+02:00",
355
+ "version": "3.6.0",
356
+ "current": false
357
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schedule": [{ "time": "2021-10-11T00:00:00.000+02:00", "value": false, "countHours": 48 }],
3
+ "config": {
4
+ "contextStorage": "default",
5
+ "doNotSplit": true,
6
+ "fromTime": "10",
7
+ "hoursOn": 4,
8
+ "maxPrice": 0.23,
9
+ "outputIfNoSchedule": true,
10
+ "outputOutsidePeriod": false,
11
+ "sendCurrentValueWhenRescheduling": true,
12
+ "toTime": "20"
13
+ }
14
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "schedule": [
3
+ { "time": "2021-10-11T00:00:00.000+02:00", "value": false, "countHours": 11 },
4
+ { "time": "2021-10-11T11:00:00.000+02:00", "value": true, "countHours": 4 },
5
+ { "time": "2021-10-11T15:00:00.000+02:00", "value": false, "countHours": 21 },
6
+ { "time": "2021-10-12T12:00:00.000+02:00", "value": true, "countHours": 4 },
7
+ { "time": "2021-10-12T16:00:00.000+02:00", "value": false, "countHours": 8 }
8
+ ],
9
+ "config": {
10
+ "contextStorage": "default",
11
+ "doNotSplit": true,
12
+ "fromTime": "10",
13
+ "hoursOn": 4,
14
+ "maxPrice": 1,
15
+ "outputIfNoSchedule": true,
16
+ "outputOutsidePeriod": false,
17
+ "sendCurrentValueWhenRescheduling": true,
18
+ "toTime": "20"
19
+ }
20
+ }
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "schedule": [
3
- { "time": "2021-10-11T00:00:00.000+02:00", "value": false },
4
- { "time": "2021-10-11T11:00:00.000+02:00", "value": true },
5
- { "time": "2021-10-11T15:00:00.000+02:00", "value": false },
6
- { "time": "2021-10-12T12:00:00.000+02:00", "value": true },
7
- { "time": "2021-10-12T16:00:00.000+02:00", "value": false }
3
+ { "time": "2021-10-11T00:00:00.000+02:00", "value": false, "countHours": 11 },
4
+ { "time": "2021-10-11T11:00:00.000+02:00", "value": true, "countHours": 4 },
5
+ { "time": "2021-10-11T15:00:00.000+02:00", "value": false, "countHours": 21 },
6
+ { "time": "2021-10-12T12:00:00.000+02:00", "value": true, "countHours": 4 },
7
+ { "time": "2021-10-12T16:00:00.000+02:00", "value": false, "countHours": 8 }
8
8
  ],
9
9
  "config": {
10
10
  "contextStorage": "default",
11
11
  "doNotSplit": true,
12
12
  "fromTime": "10",
13
13
  "hoursOn": 4,
14
+ "maxPrice": null,
14
15
  "outputIfNoSchedule": true,
15
16
  "outputOutsidePeriod": false,
16
17
  "sendCurrentValueWhenRescheduling": true,