node-red-contrib-power-saver 3.2.1 → 3.3.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 (105) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -1
  3. package/docs/.vuepress/clientAppEnhance.js +5 -0
  4. package/docs/.vuepress/components/BestSaveVerificator.vue +306 -0
  5. package/docs/.vuepress/components/DonateButtons.vue +87 -0
  6. package/docs/.vuepress/config.js +29 -5
  7. package/docs/.vuepress/dist/.nojekyll +0 -0
  8. package/docs/.vuepress/dist/404.html +5 -5
  9. package/docs/.vuepress/dist/assets/css/563.styles.99f4a8aa.css +1 -0
  10. package/docs/.vuepress/dist/assets/css/835.styles.c5afb22b.css +1 -0
  11. package/docs/.vuepress/dist/assets/css/{styles.e835bef6.css → styles.031dcf27.css} +2 -1
  12. package/docs/.vuepress/dist/assets/img/best-save-config.79a2f39a.png +0 -0
  13. package/docs/.vuepress/dist/assets/img/copy-payload-best-save.b9192985.png +0 -0
  14. package/docs/.vuepress/dist/assets/js/262.cf2c57d2.js +1 -0
  15. package/docs/.vuepress/dist/assets/js/{293.5e967839.js → 293.08ea5200.js} +0 -0
  16. package/docs/.vuepress/dist/assets/js/331.15ee3c51.js +1 -0
  17. package/docs/.vuepress/dist/assets/js/{491.c183eba3.js → 491.17a98f38.js} +0 -0
  18. package/docs/.vuepress/dist/assets/js/619.8ba1b1f6.js +2 -0
  19. package/docs/.vuepress/dist/assets/js/{812.79dad458.js.LICENSE.txt → 619.8ba1b1f6.js.LICENSE.txt} +0 -0
  20. package/docs/.vuepress/dist/assets/js/811.6a3392d5.js +1 -0
  21. package/docs/.vuepress/dist/assets/js/app.b705176c.js +1 -0
  22. package/docs/.vuepress/dist/assets/js/runtime~app.47f4f812.js +1 -0
  23. package/docs/.vuepress/dist/assets/js/{v-0607240a.661e1808.js → v-0607240a.a57c2199.js} +0 -0
  24. package/docs/.vuepress/dist/assets/js/{v-08683c60.a6b9cf5b.js → v-08683c60.ccafdcab.js} +0 -0
  25. package/docs/.vuepress/dist/assets/js/{v-0aca7ba6.b42fad7f.js → v-0aca7ba6.25903946.js} +0 -0
  26. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.a6a015b4.js +1 -0
  27. package/docs/.vuepress/dist/assets/js/{v-1ad821fa.6e2194d0.js → v-1ad821fa.5978386f.js} +0 -0
  28. package/docs/.vuepress/dist/assets/js/{v-1e2b191e.98cc227b.js → v-1e2b191e.88dc5555.js} +0 -0
  29. package/docs/.vuepress/dist/assets/js/v-29504124.4aca27d5.js +1 -0
  30. package/docs/.vuepress/dist/assets/js/{v-30acb564.f2fcd69f.js → v-30acb564.529a3c16.js} +0 -0
  31. package/docs/.vuepress/dist/assets/js/v-4637f9e4.703b1d96.js +1 -0
  32. package/docs/.vuepress/dist/assets/js/v-510ed0d4.7b142a81.js +1 -0
  33. package/docs/.vuepress/dist/assets/js/{v-5954bcb2.182daf70.js → v-5954bcb2.937005d0.js} +0 -0
  34. package/docs/.vuepress/dist/assets/js/{v-5db8da3a.f2de6cb9.js → v-5db8da3a.3de3588d.js} +1 -1
  35. package/docs/.vuepress/dist/assets/js/{v-61f728ca.6fdbbb92.js → v-61f728ca.21d432fe.js} +1 -1
  36. package/docs/.vuepress/dist/assets/js/{v-677dfaed.0013f083.js → v-677dfaed.44a653b9.js} +0 -0
  37. package/docs/.vuepress/dist/assets/js/v-7446a652.74b21d0b.js +1 -0
  38. package/docs/.vuepress/dist/assets/js/v-7c87f26e.ee5be992.js +1 -0
  39. package/docs/.vuepress/dist/assets/js/{v-8daa1a0e.dde202c9.js → v-8daa1a0e.c63afc2b.js} +1 -1
  40. package/docs/.vuepress/dist/assets/js/{v-b4a42144.9e5f9728.js → v-b4a42144.733e4e7c.js} +0 -0
  41. package/docs/.vuepress/dist/assets/js/{v-e8c55052.8384b053.js → v-e8c55052.ab0a79ec.js} +0 -0
  42. package/docs/.vuepress/dist/assets/js/v-fffb8e28.525be02a.js +1 -0
  43. package/docs/.vuepress/dist/changelog/index.html +5 -5
  44. package/docs/.vuepress/dist/contribute/index.html +5 -5
  45. package/docs/.vuepress/dist/examples/example-next-schedule-entity.html +6 -6
  46. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +6 -7
  47. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +6 -6
  48. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +6 -7
  49. package/docs/.vuepress/dist/examples/index.html +5 -5
  50. package/docs/.vuepress/dist/faq/best-save-viewer.html +15 -0
  51. package/docs/.vuepress/dist/faq/index.html +5 -5
  52. package/docs/.vuepress/dist/guide/index.html +6 -6
  53. package/docs/.vuepress/dist/index.html +5 -5
  54. package/docs/.vuepress/dist/nodes/index.html +5 -5
  55. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +7 -7
  56. package/docs/.vuepress/dist/nodes/power-saver.html +5 -5
  57. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +5 -5
  58. package/docs/.vuepress/dist/nodes/ps-general-add-tariff.html +5 -5
  59. package/docs/.vuepress/dist/nodes/ps-receive-price.html +8 -8
  60. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +22 -8
  61. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +17 -7
  62. package/docs/.vuepress/dist/nodes/strategy-input.html +5 -5
  63. package/docs/README.md +4 -1
  64. package/docs/changelog/README.md +23 -0
  65. package/docs/contribute/README.md +3 -3
  66. package/docs/examples/example-nordpool-current-state.md +0 -1
  67. package/docs/examples/example-tibber-mqtt.md +0 -1
  68. package/docs/faq/README.md +28 -1
  69. package/docs/faq/best-save-viewer.md +61 -0
  70. package/docs/images/best-save-config.png +0 -0
  71. package/docs/images/copy-payload-best-save.png +0 -0
  72. package/docs/nodes/ps-strategy-best-save.md +81 -8
  73. package/docs/nodes/ps-strategy-lowest-price.md +43 -0
  74. package/package.json +7 -3
  75. package/src/general-add-tariff-functions.js +0 -1
  76. package/src/general-add-tariff.js +2 -4
  77. package/src/handle-input.js +30 -10
  78. package/src/strategy-best-save.html +0 -21
  79. package/src/strategy-best-save.js +8 -11
  80. package/test/commands-input.test.js +47 -0
  81. package/test/data/best-save-result.json +1 -2
  82. package/test/data/current-undefined-prices.json +197 -0
  83. package/test/data/current-undefined-result.json +208 -0
  84. package/test/data/lowest-price-result-missing-end.json +2 -1
  85. package/test/data/reconfigResult.js +56 -294
  86. package/test/data/reconfigResult_old2.js +75 -0
  87. package/test/data/tibber-result-end-0-24h.json +1 -0
  88. package/test/data/tibber-result-end-0.json +1 -0
  89. package/test/send-config-input.test.js +3 -37
  90. package/test/strategy-best-save-test-utils.js +2 -1
  91. package/test/strategy-best-save.test.js +14 -8
  92. package/test/test-utils.js +1 -7
  93. package/test/utils.test.js +0 -33
  94. package/docs/.vuepress/dist/assets/img/best-save-config.93fa3c21.png +0 -0
  95. package/docs/.vuepress/dist/assets/js/812.79dad458.js +0 -2
  96. package/docs/.vuepress/dist/assets/js/app.71667b0b.js +0 -1
  97. package/docs/.vuepress/dist/assets/js/runtime~app.66b2a0e5.js +0 -1
  98. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.3b37457f.js +0 -1
  99. package/docs/.vuepress/dist/assets/js/v-4637f9e4.b320f5e8.js +0 -1
  100. package/docs/.vuepress/dist/assets/js/v-510ed0d4.a641cf89.js +0 -1
  101. package/docs/.vuepress/dist/assets/js/v-7446a652.d05e2648.js +0 -1
  102. package/docs/.vuepress/dist/assets/js/v-7c87f26e.1127dcf5.js +0 -1
  103. package/docs/.vuepress/dist/assets/js/v-fffb8e28.3406fd88.js +0 -1
  104. package/test/data/adjustedResult.js +0 -302
  105. package/test/data/adjustedResult_old.js +0 -154
@@ -1,154 +0,0 @@
1
- module.exports = {
2
- schedule: [
3
- {
4
- time: "2021-06-20T01:50:00.080+02:00",
5
- value: true,
6
- },
7
- {
8
- time: "2021-06-20T01:50:00.100+02:00",
9
- value: false,
10
- },
11
- {
12
- time: "2021-06-20T01:50:00.120+02:00",
13
- value: true,
14
- },
15
- {
16
- time: "2021-06-20T01:50:00.130+02:00",
17
- value: false,
18
- },
19
- {
20
- time: "2021-06-20T01:50:00.180+02:00",
21
- value: true,
22
- },
23
- ],
24
- hours: [
25
- {
26
- price: 0.3,
27
- onOff: true,
28
- start: "2021-06-20T01:50:00.000+02:00",
29
- saving: null,
30
- },
31
- {
32
- price: 0.4,
33
- onOff: true,
34
- start: "2021-06-20T01:50:00.010+02:00",
35
- saving: null,
36
- },
37
- {
38
- price: 0.8,
39
- onOff: true,
40
- start: "2021-06-20T01:50:00.020+02:00",
41
- saving: null,
42
- },
43
- {
44
- price: 0.9,
45
- onOff: false,
46
- start: "2021-06-20T01:50:00.030+02:00",
47
- saving: 0.7,
48
- },
49
- {
50
- price: 0.7,
51
- onOff: false,
52
- start: "2021-06-20T01:50:00.040+02:00",
53
- saving: 0.5,
54
- },
55
- {
56
- price: 0.6,
57
- onOff: false,
58
- start: "2021-06-20T01:50:00.050+02:00",
59
- saving: 0.4,
60
- },
61
- {
62
- price: 0.5,
63
- onOff: false,
64
- start: "2021-06-20T01:50:00.060+02:00",
65
- saving: 0.3,
66
- },
67
- {
68
- price: 0.75,
69
- onOff: false,
70
- start: "2021-06-20T01:50:00.070+02:00",
71
- saving: 0.55,
72
- },
73
- {
74
- price: 0.2,
75
- onOff: true,
76
- start: "2021-06-20T01:50:00.080+02:00",
77
- saving: null,
78
- },
79
- {
80
- price: 0.85,
81
- onOff: true,
82
- start: "2021-06-20T01:50:00.090+02:00",
83
- saving: null,
84
- },
85
- {
86
- price: 1.5,
87
- onOff: false,
88
- start: "2021-06-20T01:50:00.100+02:00",
89
- saving: 0.7,
90
- },
91
- {
92
- price: 1.4,
93
- onOff: false,
94
- start: "2021-06-20T01:50:00.110+02:00",
95
- saving: 0.6,
96
- },
97
- {
98
- price: 0.8,
99
- onOff: true,
100
- start: "2021-06-20T01:50:00.120+02:00",
101
- saving: null,
102
- },
103
- {
104
- price: 0.9,
105
- onOff: false,
106
- start: "2021-06-20T01:50:00.130+02:00",
107
- saving: 0.7,
108
- },
109
- {
110
- price: 0.7,
111
- onOff: false,
112
- start: "2021-06-20T01:50:00.140+02:00",
113
- saving: 0.5,
114
- },
115
- {
116
- price: 0.6,
117
- onOff: false,
118
- start: "2021-06-20T01:50:00.150+02:00",
119
- saving: 0.4,
120
- },
121
- {
122
- price: 0.5,
123
- onOff: false,
124
- start: "2021-06-20T01:50:00.160+02:00",
125
- saving: 0.3,
126
- },
127
- {
128
- price: 0.75,
129
- onOff: false,
130
- start: "2021-06-20T01:50:00.170+02:00",
131
- saving: 0.55,
132
- },
133
- {
134
- price: 0.2,
135
- onOff: true,
136
- start: "2021-06-20T01:50:00.180+02:00",
137
- saving: null,
138
- },
139
- {
140
- price: 0.85,
141
- onOff: true,
142
- start: "2021-06-20T01:50:00.190+02:00",
143
- saving: null,
144
- },
145
- ],
146
- source: "Other",
147
- config: {
148
- maxHoursToSaveInSequence: 5,
149
- minHoursOnAfterMaxSequenceSaved: 2,
150
- minSaving: 0.25,
151
- outputIfNoSchedule: false,
152
- scheduleOnlyFromCurrentTime: true,
153
- },
154
- };