node-red-contrib-power-saver 2.1.0 → 3.0.3

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 (179) hide show
  1. package/.github/FUNDING.yml +12 -0
  2. package/CHANGELOG.md +1 -43
  3. package/README.md +3 -231
  4. package/docs/.vuepress/config.js +67 -0
  5. package/docs/.vuepress/dist/404.html +15 -0
  6. package/docs/.vuepress/dist/assets/css/styles.e835bef6.css +8 -0
  7. package/docs/.vuepress/dist/assets/img/back-to-top.8b37f773.svg +1 -0
  8. package/docs/.vuepress/dist/assets/img/elvia-config-no-config.b4bb972c.png +0 -0
  9. package/docs/.vuepress/dist/assets/img/elvia-config-no-tariff.3f89aba8.png +0 -0
  10. package/docs/.vuepress/dist/assets/img/elvia-config-select-tariff.0f73fd56.png +0 -0
  11. package/docs/.vuepress/dist/assets/img/elvia-config-subscription-key.8be8ab8a.png +0 -0
  12. package/docs/.vuepress/dist/assets/img/elvia-flow.bae2a4d5.png +0 -0
  13. package/docs/.vuepress/dist/assets/img/example-flow-1.3ff3e23f.png +0 -0
  14. package/docs/.vuepress/dist/assets/img/example-flow-2.b653b58d.png +0 -0
  15. package/docs/.vuepress/dist/assets/img/migrate-best-save.f73420f6.png +0 -0
  16. package/docs/.vuepress/dist/assets/img/migrate-power-saver.aae13f9d.png +0 -0
  17. package/docs/.vuepress/dist/assets/img/node-power-saver.51ff2e5d.png +0 -0
  18. package/docs/.vuepress/dist/assets/img/node-ps-elvia-add-tariff.94ea2b09.png +0 -0
  19. package/docs/.vuepress/dist/assets/img/node-ps-receive-price.76eaa418.png +0 -0
  20. package/docs/.vuepress/dist/assets/img/node-ps-strategy-best-save.392292d5.png +0 -0
  21. package/docs/.vuepress/dist/assets/img/node-ps-strategy-lowest-price.3a4ad347.png +0 -0
  22. package/docs/.vuepress/dist/assets/img/power-saver-nordpool-current-state.bf14afde.png +0 -0
  23. package/docs/.vuepress/dist/assets/img/power-saver-nordpool-events-state.8c392507.png +0 -0
  24. package/docs/.vuepress/dist/assets/img/power-saver-tibber-mqtt.16891dd2.png +0 -0
  25. package/docs/.vuepress/dist/assets/js/293.5e967839.js +1 -0
  26. package/docs/.vuepress/dist/assets/js/491.c183eba3.js +1 -0
  27. package/docs/.vuepress/dist/assets/js/812.79dad458.js +2 -0
  28. package/docs/.vuepress/dist/assets/js/812.79dad458.js.LICENSE.txt +8 -0
  29. package/docs/.vuepress/dist/assets/js/app.4ee3384b.js +1 -0
  30. package/docs/.vuepress/dist/assets/js/runtime~app.cafd6537.js +1 -0
  31. package/docs/.vuepress/dist/assets/js/v-08683c60.07fe8291.js +1 -0
  32. package/docs/.vuepress/dist/assets/js/v-0aca7ba6.aec5ba75.js +1 -0
  33. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.d008d8bc.js +1 -0
  34. package/docs/.vuepress/dist/assets/js/v-1ad821fa.85407071.js +1 -0
  35. package/docs/.vuepress/dist/assets/js/v-30acb564.73b8e29f.js +1 -0
  36. package/docs/.vuepress/dist/assets/js/v-3706649a.d7f73384.js +1 -0
  37. package/docs/.vuepress/dist/assets/js/v-4637f9e4.22ab9413.js +1 -0
  38. package/docs/.vuepress/dist/assets/js/v-510ed0d4.204a09ec.js +1 -0
  39. package/docs/.vuepress/dist/assets/js/v-5954bcb2.be07962c.js +1 -0
  40. package/docs/.vuepress/dist/assets/js/v-5db8da3a.ac192f35.js +1 -0
  41. package/docs/.vuepress/dist/assets/js/v-61f728ca.802ab15e.js +1 -0
  42. package/docs/.vuepress/dist/assets/js/v-677dfaed.9bbbd037.js +1 -0
  43. package/docs/.vuepress/dist/assets/js/v-7c87f26e.457a1a60.js +1 -0
  44. package/docs/.vuepress/dist/assets/js/v-8daa1a0e.db8b59c6.js +1 -0
  45. package/docs/.vuepress/dist/assets/js/v-b4a42144.6e0c5aa0.js +1 -0
  46. package/docs/.vuepress/dist/assets/js/v-e8c55052.5f85b6cd.js +1 -0
  47. package/docs/.vuepress/dist/assets/js/v-fffb8e28.e815e852.js +1 -0
  48. package/docs/.vuepress/dist/changelog/index.html +15 -0
  49. package/docs/.vuepress/dist/contribute/index.html +15 -0
  50. package/docs/.vuepress/dist/euro.png +0 -0
  51. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +169 -0
  52. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +173 -0
  53. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +182 -0
  54. package/docs/.vuepress/dist/examples/index.html +15 -0
  55. package/docs/.vuepress/dist/guide/index.html +52 -0
  56. package/docs/.vuepress/dist/index.html +15 -0
  57. package/docs/.vuepress/dist/logo.png +0 -0
  58. package/docs/.vuepress/dist/nodes/index.html +15 -0
  59. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +97 -0
  60. package/docs/.vuepress/dist/nodes/power-saver.html +15 -0
  61. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +15 -0
  62. package/docs/.vuepress/dist/nodes/ps-receive-price.html +80 -0
  63. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +65 -0
  64. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +89 -0
  65. package/docs/.vuepress/dist/nodes/strategy-input.html +40 -0
  66. package/docs/.vuepress/public/euro.png +0 -0
  67. package/docs/.vuepress/public/logo.png +0 -0
  68. package/docs/README.md +32 -0
  69. package/docs/changelog/README.md +71 -0
  70. package/docs/contribute/README.md +39 -0
  71. package/docs/examples/README.md +5 -0
  72. package/docs/examples/example-nordpool-current-state.md +166 -0
  73. package/docs/examples/example-nordpool-events-state.md +170 -0
  74. package/docs/examples/example-tibber-mqtt.md +179 -0
  75. package/docs/guide/README.md +202 -0
  76. package/docs/images/all-nodes.png +0 -0
  77. package/docs/images/best-save-config.png +0 -0
  78. package/docs/images/elvia-add-tariff-node-used.png +0 -0
  79. package/docs/images/elvia-config-no-config.png +0 -0
  80. package/docs/images/elvia-config-no-tariff.png +0 -0
  81. package/docs/images/elvia-config-select-tariff.png +0 -0
  82. package/docs/images/elvia-config-subscription-key.png +0 -0
  83. package/docs/images/elvia-flow.png +0 -0
  84. package/docs/images/elvia-tariff-config.png +0 -0
  85. package/docs/images/euro.png +0 -0
  86. package/docs/images/example-flow-1.png +0 -0
  87. package/docs/images/example-flow-2.png +0 -0
  88. package/docs/images/logo.png +0 -0
  89. package/docs/images/lowest-price-config.png +0 -0
  90. package/docs/images/migrate-best-save.png +0 -0
  91. package/docs/images/migrate-power-saver.png +0 -0
  92. package/docs/images/node-power-saver.png +0 -0
  93. package/docs/images/node-ps-elvia-add-tariff.png +0 -0
  94. package/docs/images/node-ps-elvia-tariff-types.png +0 -0
  95. package/docs/images/node-ps-elvia-tariff.png +0 -0
  96. package/docs/images/node-ps-receive-price.png +0 -0
  97. package/docs/images/node-ps-strategy-best-save.png +0 -0
  98. package/docs/images/node-ps-strategy-lowest-price.png +0 -0
  99. package/{doc → docs/images}/node-red-contrib-power-saver-flow.png +0 -0
  100. package/docs/images/power-saver-nordpool-current-state.png +0 -0
  101. package/docs/images/power-saver-nordpool-events-state.png +0 -0
  102. package/docs/images/power-saver-tibber-mqtt.png +0 -0
  103. package/docs/nodes/README.md +53 -0
  104. package/docs/nodes/old-power-saver-doc.md +231 -0
  105. package/docs/nodes/power-saver.md +23 -0
  106. package/docs/nodes/ps-elvia-add-tariff.md +52 -0
  107. package/docs/nodes/ps-receive-price.md +153 -0
  108. package/docs/nodes/ps-strategy-best-save.md +142 -0
  109. package/docs/nodes/ps-strategy-lowest-price.md +165 -0
  110. package/docs/nodes/strategy-input.md +39 -0
  111. package/package.json +16 -4
  112. package/src/elvia/elvia-add-tariff.html +70 -0
  113. package/src/elvia/elvia-add-tariff.js +47 -0
  114. package/src/elvia/elvia-api.js +61 -0
  115. package/src/elvia/elvia-config.html +46 -0
  116. package/src/elvia/elvia-config.js +19 -0
  117. package/src/elvia/elvia-tariff-types.html +34 -0
  118. package/src/elvia/elvia-tariff-types.js +25 -0
  119. package/src/elvia/elvia-tariff.html +89 -0
  120. package/src/elvia/elvia-tariff.js +22 -0
  121. package/src/elvia/icons/elvia_hvite.svg +4 -0
  122. package/src/elvia/icons/elvia_positive_4 copy.svg +4 -0
  123. package/src/handle-input.js +162 -0
  124. package/src/power-saver.html +116 -0
  125. package/{power-saver.js → src/power-saver.js} +9 -32
  126. package/src/receive-price-functions.js +99 -0
  127. package/src/receive-price.html +30 -0
  128. package/src/receive-price.js +21 -0
  129. package/src/strategy-best-save-functions.js +110 -0
  130. package/src/strategy-best-save.html +116 -0
  131. package/src/strategy-best-save.js +95 -0
  132. package/src/strategy-lowest-price-functions.js +35 -0
  133. package/src/strategy-lowest-price.html +168 -0
  134. package/src/strategy-lowest-price.js +125 -0
  135. package/{utils.js → src/utils.js} +44 -100
  136. package/test/data/adjustedResult.js +219 -71
  137. package/test/data/adjustedResult_old.js +154 -0
  138. package/test/data/best-save-result.json +357 -0
  139. package/test/data/converted-prices.json +197 -0
  140. package/test/data/elvia-input-grid-tariff.json +760 -0
  141. package/test/data/elvia-input-power-prices.json +194 -0
  142. package/test/data/elvia-output-add-tariff.json +290 -0
  143. package/test/data/lowest-price-result-cont.json +18 -0
  144. package/test/data/lowest-price-result-split-allday.json +21 -0
  145. package/test/data/lowest-price-result-split-allday10.json +20 -0
  146. package/test/data/lowest-price-result-split.json +20 -0
  147. package/test/data/nordpool-current-state-prices.json +283 -0
  148. package/test/data/nordpool-event-prices.json +574 -0
  149. package/test/data/reconfigResult.js +220 -67
  150. package/test/data/reconfigResult_old.js +141 -0
  151. package/test/data/tibber-data-end-0-24h.json +197 -0
  152. package/test/data/tibber-data-end-0.json +101 -0
  153. package/test/data/tibber-prices-single-home.json +64 -0
  154. package/test/data/tibber-prices.json +124 -0
  155. package/test/data/tibber-result-end-0-24h.json +320 -0
  156. package/test/data/tibber-result-end-0.json +168 -0
  157. package/test/data/{tibber_result.json → tibber-result.json} +0 -0
  158. package/test/elvia.test.js +26 -0
  159. package/test/mostSavedStrategy.test.js +22 -55
  160. package/test/power-saver.test.js +21 -5
  161. package/test/receive-price-functions.test.js +153 -0
  162. package/test/receive-price.test.js +122 -0
  163. package/test/send-config-input.test.js +8 -10
  164. package/test/strategy-best-save-test-utils.js +32 -0
  165. package/test/strategy-best-save.test.js +103 -0
  166. package/test/strategy-lowest-price-functions.test.js +40 -0
  167. package/test/strategy-lowest-price.test.js +538 -0
  168. package/test/test-utils.js +0 -18
  169. package/test/utils.test.js +22 -180
  170. package/doc/example-nordpool-current-state.md +0 -166
  171. package/doc/example-nordpool-events-state.md +0 -153
  172. package/doc/example-tibber-mqtt.md +0 -189
  173. package/doc/power-saver-nordpool-current-state.png +0 -0
  174. package/doc/power-saver-nordpool-events-state.png +0 -0
  175. package/doc/power-saver-tibber-mqtt.png +0 -0
  176. package/mostSavedStrategy.js +0 -84
  177. package/power-saver.html +0 -308
  178. package/test/data/tibber_data.json +0 -412
  179. package/test/data/tibber_prices.json +0 -412
@@ -1,161 +1,314 @@
1
1
  module.exports = {
2
2
  schedule: [
3
+ { time: "2021-06-20T01:50:00.080+02:00", value: false },
4
+ { time: "2021-06-20T01:50:00.110+02:00", value: true },
5
+ { time: "2021-06-20T01:50:00.180+02:00", value: false },
6
+ { time: "2021-06-20T01:50:00.200+02:00", value: true },
7
+ { time: "2021-06-20T01:50:00.220+02:00", value: false },
8
+ { time: "2021-06-20T01:50:00.250+02:00", value: true },
9
+ { time: "2021-06-20T01:50:00.330+02:00", value: false },
10
+ { time: "2021-06-20T01:50:00.360+02:00", value: true },
11
+ { time: "2021-06-20T01:50:00.400+02:00", value: false },
12
+ { time: "2021-06-20T01:50:00.430+02:00", value: true },
13
+ { time: "2021-06-20T01:50:00.460+02:00", value: false },
14
+ { time: "2021-06-20T01:50:00.470+02:00", value: true },
15
+ ],
16
+ hours: [
3
17
  {
4
- time: "2021-06-20T01:50:00.050+02:00",
5
- value: true,
18
+ price: 0.2494,
19
+ onOff: false,
20
+ start: "2021-06-20T01:50:00.000+02:00",
21
+ saving: 0.0395,
6
22
  },
7
23
  {
8
- time: "2021-06-20T01:50:00.060+02:00",
9
- value: false,
24
+ price: 0.2209,
25
+ onOff: false,
26
+ start: "2021-06-20T01:50:00.010+02:00",
27
+ saving: 0.011,
10
28
  },
11
29
  {
12
- time: "2021-06-20T01:50:00.080+02:00",
13
- value: true,
30
+ price: 0.2099,
31
+ onOff: true,
32
+ start: "2021-06-20T01:50:00.020+02:00",
33
+ saving: null,
14
34
  },
15
35
  {
16
- time: "2021-06-20T01:50:00.090+02:00",
17
- value: false,
36
+ price: 0.219,
37
+ onOff: true,
38
+ start: "2021-06-20T01:50:00.030+02:00",
39
+ saving: null,
18
40
  },
19
41
  {
20
- time: "2021-06-20T01:50:00.120+02:00",
21
- value: true,
42
+ price: 0.2614,
43
+ onOff: true,
44
+ start: "2021-06-20T01:50:00.040+02:00",
45
+ saving: null,
22
46
  },
23
47
  {
24
- time: "2021-06-20T01:50:00.150+02:00",
25
- value: false,
48
+ price: 0.4426,
49
+ onOff: true,
50
+ start: "2021-06-20T01:50:00.050+02:00",
51
+ saving: null,
26
52
  },
27
53
  {
28
- time: "2021-06-20T01:50:00.180+02:00",
29
- value: true,
54
+ price: 0.5433,
55
+ onOff: true,
56
+ start: "2021-06-20T01:50:00.060+02:00",
57
+ saving: null,
30
58
  },
31
- ],
32
- hours: [
33
59
  {
34
- price: 0.3,
60
+ price: 0.5667,
35
61
  onOff: true,
36
- start: "2021-06-20T01:50:00.000+02:00",
62
+ start: "2021-06-20T01:50:00.070+02:00",
63
+ saving: null,
64
+ },
65
+ {
66
+ price: 0.5847,
67
+ onOff: false,
68
+ start: "2021-06-20T01:50:00.080+02:00",
69
+ saving: 0.0723,
70
+ },
71
+ {
72
+ price: 0.5762,
73
+ onOff: false,
74
+ start: "2021-06-20T01:50:00.090+02:00",
75
+ saving: 0.0638,
76
+ },
77
+ {
78
+ price: 0.5391,
79
+ onOff: false,
80
+ start: "2021-06-20T01:50:00.100+02:00",
81
+ saving: 0.0267,
82
+ },
83
+ {
84
+ price: 0.5124,
85
+ onOff: true,
86
+ start: "2021-06-20T01:50:00.110+02:00",
37
87
  saving: null,
38
88
  },
39
89
  {
40
- price: 0.4,
90
+ price: 0.504,
41
91
  onOff: true,
42
- start: "2021-06-20T01:50:00.010+02:00",
92
+ start: "2021-06-20T01:50:00.120+02:00",
43
93
  saving: null,
44
94
  },
45
95
  {
46
- price: 0.8,
96
+ price: 0.5057,
47
97
  onOff: true,
48
- start: "2021-06-20T01:50:00.020+02:00",
98
+ start: "2021-06-20T01:50:00.130+02:00",
99
+ saving: null,
100
+ },
101
+ {
102
+ price: 0.5066,
103
+ onOff: true,
104
+ start: "2021-06-20T01:50:00.140+02:00",
49
105
  saving: null,
50
106
  },
51
107
  {
52
- price: 0.9,
108
+ price: 0.5136,
109
+ onOff: true,
110
+ start: "2021-06-20T01:50:00.150+02:00",
111
+ saving: null,
112
+ },
113
+ {
114
+ price: 0.5143,
115
+ onOff: true,
116
+ start: "2021-06-20T01:50:00.160+02:00",
117
+ saving: null,
118
+ },
119
+ {
120
+ price: 0.5306,
121
+ onOff: true,
122
+ start: "2021-06-20T01:50:00.170+02:00",
123
+ saving: null,
124
+ },
125
+ {
126
+ price: 0.5534,
53
127
  onOff: false,
54
- start: "2021-06-20T01:50:00.030+02:00",
55
- saving: 0.3,
128
+ start: "2021-06-20T01:50:00.180+02:00",
129
+ saving: 0.0043,
56
130
  },
57
131
  {
58
- price: 0.7,
132
+ price: 0.5511,
59
133
  onOff: false,
60
- start: "2021-06-20T01:50:00.040+02:00",
61
- saving: 0.1,
134
+ start: "2021-06-20T01:50:00.190+02:00",
135
+ saving: 0.002,
62
136
  },
63
137
  {
64
- price: 0.6,
138
+ price: 0.5491,
65
139
  onOff: true,
66
- start: "2021-06-20T01:50:00.050+02:00",
140
+ start: "2021-06-20T01:50:00.200+02:00",
67
141
  saving: null,
68
142
  },
69
143
  {
70
- price: 0.5,
144
+ price: 0.5485,
145
+ onOff: true,
146
+ start: "2021-06-20T01:50:00.210+02:00",
147
+ saving: null,
148
+ },
149
+ {
150
+ price: 0.5481,
71
151
  onOff: false,
72
- start: "2021-06-20T01:50:00.060+02:00",
73
- saving: 0.3,
152
+ start: "2021-06-20T01:50:00.220+02:00",
153
+ saving: 0.1285,
74
154
  },
75
155
  {
76
- price: 0.75,
156
+ price: 0.5218,
77
157
  onOff: false,
78
- start: "2021-06-20T01:50:00.070+02:00",
79
- saving: 0.55,
158
+ start: "2021-06-20T01:50:00.230+02:00",
159
+ saving: 0.1022,
80
160
  },
81
161
  {
82
- price: 0.2,
162
+ price: 0.4533,
163
+ onOff: false,
164
+ start: "2021-06-20T01:50:00.240+02:00",
165
+ saving: 0.0337,
166
+ },
167
+ {
168
+ price: 0.4196,
83
169
  onOff: true,
84
- start: "2021-06-20T01:50:00.080+02:00",
170
+ start: "2021-06-20T01:50:00.250+02:00",
171
+ saving: null,
172
+ },
173
+ {
174
+ price: 0.4037,
175
+ onOff: true,
176
+ start: "2021-06-20T01:50:00.260+02:00",
85
177
  saving: null,
86
178
  },
87
179
  {
88
- price: 0.85,
180
+ price: 0.3829,
181
+ onOff: true,
182
+ start: "2021-06-20T01:50:00.270+02:00",
183
+ saving: null,
184
+ },
185
+ {
186
+ price: 0.4555,
187
+ onOff: true,
188
+ start: "2021-06-20T01:50:00.280+02:00",
189
+ saving: null,
190
+ },
191
+ {
192
+ price: 0.4721,
193
+ onOff: true,
194
+ start: "2021-06-20T01:50:00.290+02:00",
195
+ saving: null,
196
+ },
197
+ {
198
+ price: 0.4903,
199
+ onOff: true,
200
+ start: "2021-06-20T01:50:00.300+02:00",
201
+ saving: null,
202
+ },
203
+ {
204
+ price: 0.5028,
205
+ onOff: true,
206
+ start: "2021-06-20T01:50:00.310+02:00",
207
+ saving: null,
208
+ },
209
+ {
210
+ price: 0.5163,
211
+ onOff: true,
212
+ start: "2021-06-20T01:50:00.320+02:00",
213
+ saving: null,
214
+ },
215
+ {
216
+ price: 0.5264,
89
217
  onOff: false,
90
- start: "2021-06-20T01:50:00.090+02:00",
91
- saving: 0.05,
218
+ start: "2021-06-20T01:50:00.330+02:00",
219
+ saving: 0.0193,
92
220
  },
93
221
  {
94
- price: 1.5,
222
+ price: 0.5346,
95
223
  onOff: false,
96
- start: "2021-06-20T01:50:00.100+02:00",
97
- saving: 0.7,
224
+ start: "2021-06-20T01:50:00.340+02:00",
225
+ saving: 0.0275,
98
226
  },
99
227
  {
100
- price: 1.4,
228
+ price: 0.5224,
101
229
  onOff: false,
102
- start: "2021-06-20T01:50:00.110+02:00",
103
- saving: 0.6,
230
+ start: "2021-06-20T01:50:00.350+02:00",
231
+ saving: 0.0153,
104
232
  },
105
233
  {
106
- price: 0.8,
234
+ price: 0.5071,
107
235
  onOff: true,
108
- start: "2021-06-20T01:50:00.120+02:00",
236
+ start: "2021-06-20T01:50:00.360+02:00",
109
237
  saving: null,
110
238
  },
111
239
  {
112
- price: 0.9,
240
+ price: 0.5045,
113
241
  onOff: true,
114
- start: "2021-06-20T01:50:00.130+02:00",
242
+ start: "2021-06-20T01:50:00.370+02:00",
115
243
  saving: null,
116
244
  },
117
245
  {
118
- price: 0.7,
246
+ price: 0.5024,
119
247
  onOff: true,
120
- start: "2021-06-20T01:50:00.140+02:00",
248
+ start: "2021-06-20T01:50:00.380+02:00",
249
+ saving: null,
250
+ },
251
+ {
252
+ price: 0.5038,
253
+ onOff: true,
254
+ start: "2021-06-20T01:50:00.390+02:00",
121
255
  saving: null,
122
256
  },
123
257
  {
124
- price: 0.6,
258
+ price: 0.5118,
125
259
  onOff: false,
126
- start: "2021-06-20T01:50:00.150+02:00",
127
- saving: 0.4,
260
+ start: "2021-06-20T01:50:00.400+02:00",
261
+ saving: 0.0063,
128
262
  },
129
263
  {
130
- price: 0.5,
264
+ price: 0.5111,
131
265
  onOff: false,
132
- start: "2021-06-20T01:50:00.160+02:00",
133
- saving: 0.3,
266
+ start: "2021-06-20T01:50:00.410+02:00",
267
+ saving: 0.0056,
134
268
  },
135
269
  {
136
- price: 0.75,
270
+ price: 0.5108,
137
271
  onOff: false,
138
- start: "2021-06-20T01:50:00.170+02:00",
139
- saving: 0.55,
272
+ start: "2021-06-20T01:50:00.420+02:00",
273
+ saving: 0.0053,
140
274
  },
141
275
  {
142
- price: 0.2,
276
+ price: 0.5055,
143
277
  onOff: true,
144
- start: "2021-06-20T01:50:00.180+02:00",
278
+ start: "2021-06-20T01:50:00.430+02:00",
145
279
  saving: null,
146
280
  },
147
281
  {
148
- price: 0.85,
282
+ price: 0.5042,
149
283
  onOff: true,
150
- start: "2021-06-20T01:50:00.190+02:00",
284
+ start: "2021-06-20T01:50:00.440+02:00",
285
+ saving: null,
286
+ },
287
+ {
288
+ price: 0.5259,
289
+ onOff: true,
290
+ start: "2021-06-20T01:50:00.450+02:00",
291
+ saving: null,
292
+ },
293
+ {
294
+ price: 0.5282,
295
+ onOff: false,
296
+ start: "2021-06-20T01:50:00.460+02:00",
297
+ saving: 0.003,
298
+ },
299
+ {
300
+ price: 0.5252,
301
+ onOff: true,
302
+ start: "2021-06-20T01:50:00.470+02:00",
151
303
  saving: null,
152
304
  },
153
305
  ],
154
- source: "Other",
306
+ source: undefined,
155
307
  config: {
156
308
  maxHoursToSaveInSequence: 3,
157
309
  minHoursOnAfterMaxSequenceSaved: 2,
158
310
  minSaving: 0.001,
311
+ sendCurrentValueWhenRescheduling: undefined,
159
312
  outputIfNoSchedule: false,
160
313
  scheduleOnlyFromCurrentTime: true,
161
314
  },
@@ -0,0 +1,141 @@
1
+ module.exports = {
2
+ schedule: [
3
+ { time: "2021-06-20T01:50:00.050+02:00", value: true },
4
+ { time: "2021-06-20T01:50:00.060+02:00", value: false },
5
+ { time: "2021-06-20T01:50:00.080+02:00", value: true },
6
+ { time: "2021-06-20T01:50:00.090+02:00", value: false },
7
+ { time: "2021-06-20T01:50:00.120+02:00", value: true },
8
+ { time: "2021-06-20T01:50:00.150+02:00", value: false },
9
+ { time: "2021-06-20T01:50:00.180+02:00", value: true },
10
+ ],
11
+ hours: [
12
+ {
13
+ price: 0.3,
14
+ onOff: true,
15
+ start: "2021-06-20T01:50:00.000+02:00",
16
+ saving: null,
17
+ },
18
+ {
19
+ price: 0.4,
20
+ onOff: true,
21
+ start: "2021-06-20T01:50:00.010+02:00",
22
+ saving: null,
23
+ },
24
+ {
25
+ price: 0.8,
26
+ onOff: true,
27
+ start: "2021-06-20T01:50:00.020+02:00",
28
+ saving: null,
29
+ },
30
+ {
31
+ price: 0.9,
32
+ onOff: false,
33
+ start: "2021-06-20T01:50:00.030+02:00",
34
+ saving: 0.3,
35
+ },
36
+ {
37
+ price: 0.7,
38
+ onOff: false,
39
+ start: "2021-06-20T01:50:00.040+02:00",
40
+ saving: 0.1,
41
+ },
42
+ {
43
+ price: 0.6,
44
+ onOff: true,
45
+ start: "2021-06-20T01:50:00.050+02:00",
46
+ saving: null,
47
+ },
48
+ {
49
+ price: 0.5,
50
+ onOff: false,
51
+ start: "2021-06-20T01:50:00.060+02:00",
52
+ saving: 0.3,
53
+ },
54
+ {
55
+ price: 0.75,
56
+ onOff: false,
57
+ start: "2021-06-20T01:50:00.070+02:00",
58
+ saving: 0.55,
59
+ },
60
+ {
61
+ price: 0.2,
62
+ onOff: true,
63
+ start: "2021-06-20T01:50:00.080+02:00",
64
+ saving: null,
65
+ },
66
+ {
67
+ price: 0.85,
68
+ onOff: false,
69
+ start: "2021-06-20T01:50:00.090+02:00",
70
+ saving: 0.05,
71
+ },
72
+ {
73
+ price: 1.5,
74
+ onOff: false,
75
+ start: "2021-06-20T01:50:00.100+02:00",
76
+ saving: 0.7,
77
+ },
78
+ {
79
+ price: 1.4,
80
+ onOff: false,
81
+ start: "2021-06-20T01:50:00.110+02:00",
82
+ saving: 0.6,
83
+ },
84
+ {
85
+ price: 0.8,
86
+ onOff: true,
87
+ start: "2021-06-20T01:50:00.120+02:00",
88
+ saving: null,
89
+ },
90
+ {
91
+ price: 0.9,
92
+ onOff: true,
93
+ start: "2021-06-20T01:50:00.130+02:00",
94
+ saving: null,
95
+ },
96
+ {
97
+ price: 0.7,
98
+ onOff: true,
99
+ start: "2021-06-20T01:50:00.140+02:00",
100
+ saving: null,
101
+ },
102
+ {
103
+ price: 0.6,
104
+ onOff: false,
105
+ start: "2021-06-20T01:50:00.150+02:00",
106
+ saving: 0.4,
107
+ },
108
+ {
109
+ price: 0.5,
110
+ onOff: false,
111
+ start: "2021-06-20T01:50:00.160+02:00",
112
+ saving: 0.3,
113
+ },
114
+ {
115
+ price: 0.75,
116
+ onOff: false,
117
+ start: "2021-06-20T01:50:00.170+02:00",
118
+ saving: 0.55,
119
+ },
120
+ {
121
+ price: 0.2,
122
+ onOff: true,
123
+ start: "2021-06-20T01:50:00.180+02:00",
124
+ saving: null,
125
+ },
126
+ {
127
+ price: 0.85,
128
+ onOff: true,
129
+ start: "2021-06-20T01:50:00.190+02:00",
130
+ saving: null,
131
+ },
132
+ ],
133
+ source: "Other",
134
+ config: {
135
+ maxHoursToSaveInSequence: 3,
136
+ minHoursOnAfterMaxSequenceSaved: 2,
137
+ minSaving: 0.001,
138
+ outputIfNoSchedule: false,
139
+ scheduleOnlyFromCurrentTime: true,
140
+ },
141
+ };