node-red-contrib-power-saver 5.0.0-beta.7 → 5.0.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.
- package/package.json +18 -18
- package/src/elvia/elvia-api.js +1 -1
- package/src/general-add-tariff.html +4 -4
- package/src/light-saver-functions.js +629 -0
- package/src/light-saver.html +1306 -0
- package/src/light-saver.js +721 -0
- package/src/schedule-merger.html +7 -7
- package/src/strategy-fixed-schedule.html +9 -9
- package/src/strategy-heat-capacitor.html +16 -16
- package/src/strategy-lowest-price.html +15 -14
- package/.eslintrc.js +0 -15
- package/.firebaserc +0 -5
- package/.github/FUNDING.yml +0 -12
- package/.github/workflows/publish-doc-on-merge.yml +0 -20
- package/.github/workflows/publish-to-npm.yml +0 -24
- package/.github/workflows/test-on-pull-request.yaml +0 -13
- package/CHANGELOG.md +0 -1
- package/docs/.vuepress/client.js +0 -7
- package/docs/.vuepress/clientAppEnhance.js +0 -5
- package/docs/.vuepress/components/AdsenseAdd.vue +0 -46
- package/docs/.vuepress/components/BestSaveVerificator.vue +0 -317
- package/docs/.vuepress/components/DonateButtons.vue +0 -100
- package/docs/.vuepress/components/VippsPlakat.vue +0 -20
- package/docs/.vuepress/config.js +0 -96
- package/docs/.vuepress/navbar.js +0 -43
- package/docs/.vuepress/public/Ukraine-heart-shape-flag.png +0 -0
- package/docs/.vuepress/public/ads.txt +0 -0
- package/docs/.vuepress/public/euro.png +0 -0
- package/docs/.vuepress/public/logo.png +0 -0
- package/docs/.vuepress/public/ps-logo.png +0 -0
- package/docs/README.md +0 -49
- package/docs/changelog/README.md +0 -405
- package/docs/contribute/README.md +0 -62
- package/docs/examples/README.md +0 -28
- package/docs/examples/example-cascade-temperature-control.md +0 -333
- package/docs/examples/example-grid-tariff-capacity-part.md +0 -1182
- package/docs/examples/example-heat-capacitor.md +0 -260
- package/docs/examples/example-next-schedule-entity.md +0 -41
- package/docs/examples/example-nordpool-current-state.md +0 -172
- package/docs/examples/example-nordpool-events-state.md +0 -157
- package/docs/examples/example-reduce-minutes-array.md +0 -23
- package/docs/examples/example-stromstotte.md +0 -31
- package/docs/examples/example-tibber-mqtt.md +0 -165
- package/docs/examples/example-visualize-on-off/example-visualize-on-off.md +0 -41
- package/docs/examples/example-visualize-on-off/lovelace.png +0 -0
- package/docs/examples/example-visualize-on-off/lovelace.yaml +0 -90
- package/docs/examples/example-visualize-on-off/nodes.json +0 -74
- package/docs/examples/example-visualize-on-off/nodes.png +0 -0
- package/docs/faq/README.md +0 -54
- package/docs/faq/best-save-viewer.md +0 -79
- package/docs/guide/README.md +0 -301
- package/docs/images/add-tariff-flow.png +0 -0
- package/docs/images/all-nodes.png +0 -0
- package/docs/images/best-save-config.png +0 -0
- package/docs/images/combine-two-lowest-price.png +0 -0
- package/docs/images/copy-payload-best-save.png +0 -0
- package/docs/images/elvia-add-tariff-node-used.png +0 -0
- package/docs/images/elvia-config-no-config.png +0 -0
- package/docs/images/elvia-config-no-tariff.png +0 -0
- package/docs/images/elvia-config-select-tariff.png +0 -0
- package/docs/images/elvia-config-subscription-key.png +0 -0
- package/docs/images/elvia-flow.png +0 -0
- package/docs/images/elvia-tariff-config.png +0 -0
- package/docs/images/euro.png +0 -0
- package/docs/images/example-capacity-flow.png +0 -0
- package/docs/images/example-flow-1.png +0 -0
- package/docs/images/example-flow-2.png +0 -0
- package/docs/images/fixed-schedule-config.png +0 -0
- package/docs/images/global-context-window.png +0 -0
- package/docs/images/heat-capacitor-temperatureVsPrice.png +0 -0
- package/docs/images/logo copy.png +0 -0
- package/docs/images/logo.png +0 -0
- package/docs/images/logo.psd +0 -0
- package/docs/images/lowest-price-config.png +0 -0
- package/docs/images/migrate-best-save.png +0 -0
- package/docs/images/migrate-power-saver.png +0 -0
- package/docs/images/mysterious-plan.png +0 -0
- package/docs/images/next-schedule-entity.png +0 -0
- package/docs/images/next-schedule-flow.png +0 -0
- package/docs/images/next-schedule-sensor.png +0 -0
- package/docs/images/node-ps-elvia-add-tariff.png +0 -0
- package/docs/images/node-ps-elvia-tariff-types.png +0 -0
- package/docs/images/node-ps-elvia-tariff.png +0 -0
- package/docs/images/node-ps-general-add-tariff.png +0 -0
- package/docs/images/node-ps-receive-price.png +0 -0
- package/docs/images/node-ps-schedule-merger.png +0 -0
- package/docs/images/node-ps-strategy-best-save.png +0 -0
- package/docs/images/node-ps-strategy-fixed-schedule.png +0 -0
- package/docs/images/node-ps-strategy-heat-capacitor-cascade-control.png +0 -0
- package/docs/images/node-ps-strategy-heat-capacitor-simple-flow-example.png +0 -0
- package/docs/images/node-ps-strategy-heat-capacitor.png +0 -0
- package/docs/images/node-ps-strategy-lowest-price.png +0 -0
- package/docs/images/node-red-contrib-power-saver-flow.png +0 -0
- package/docs/images/node-red-icon-2.svg +0 -30
- package/docs/images/oven-setpoint-calculation.png +0 -0
- package/docs/images/overshoot-time.png +0 -0
- package/docs/images/power-saver-nordpool-current-state.png +0 -0
- package/docs/images/power-saver-nordpool-events-state.png +0 -0
- package/docs/images/power-saver-tibber-mqtt.png +0 -0
- package/docs/images/ps-strategy-fixed-schedule-example.png +0 -0
- package/docs/images/schedule-merger-config.png +0 -0
- package/docs/images/schedule-merger-example-1.png +0 -0
- package/docs/images/stromstotte.png +0 -0
- package/docs/images/temperature-manipulation-config.png +0 -0
- package/docs/images/vipps-plakat.png +0 -0
- package/docs/images/vipps-qr.png +0 -0
- package/docs/images/vipps-smiling-rgb-orange-pos.png +0 -0
- package/docs/nodes/README.md +0 -88
- package/docs/nodes/dynamic-commands.md +0 -92
- package/docs/nodes/dynamic-config.md +0 -90
- package/docs/nodes/ps-elvia-add-tariff.md +0 -72
- package/docs/nodes/ps-general-add-tariff.md +0 -93
- package/docs/nodes/ps-receive-price.md +0 -175
- package/docs/nodes/ps-schedule-merger.md +0 -247
- package/docs/nodes/ps-strategy-best-save.md +0 -301
- package/docs/nodes/ps-strategy-fixed-schedule.md +0 -121
- package/docs/nodes/ps-strategy-heat-capacitor.md +0 -373
- package/docs/nodes/ps-strategy-lowest-price.md +0 -300
- package/docs/nodes/strategy-input.md +0 -46
- package/docs/privacy.md +0 -17
- package/donation.png +0 -0
- package/examples/add-general-tariff.json +0 -103
- package/examples/best-save-for-water-heater.json +0 -140
- package/examples/elvia-add-tariff.json +0 -99
- package/examples/elvia-get-tariff-types.json +0 -58
- package/examples/elvia-get-tariff.json +0 -60
- package/examples/example-grid-tariff-capacity-flow.json +0 -244
- package/examples/heat-capacitor-for-room-heating.json +0 -186
- package/examples/lowest-price-for-heating-cables.json +0 -159
- package/firebase.json +0 -6
- package/public/404.html +0 -33
- package/public/index.html +0 -89
- package/test/commands-input-best-save.test.js +0 -146
- package/test/commands-input-lowest-price.test.js +0 -149
- package/test/commands-input-schedule-merger.test.js +0 -127
- package/test/data/best-save-overlap-prices.json +0 -197
- package/test/data/best-save-overlap-result.json +0 -361
- package/test/data/best-save-performance-price-data.js +0 -197
- package/test/data/best-save-result.json +0 -365
- package/test/data/bug-231-input.json +0 -197
- package/test/data/bug-231-output.json +0 -1035
- package/test/data/bug-232-input.json +0 -774
- package/test/data/bug-232-output.json +0 -6040
- package/test/data/commands-result-best-save.json +0 -114
- package/test/data/commands-result-lowest-price.json +0 -340
- package/test/data/converted-prices.json +0 -198
- package/test/data/current-undefined-prices.json +0 -197
- package/test/data/current-undefined-result.json +0 -208
- package/test/data/elvia-input-grid-tariff.json +0 -760
- package/test/data/elvia-input-power-prices.json +0 -194
- package/test/data/elvia-output-add-tariff.json +0 -290
- package/test/data/fixed-schedule-result.json +0 -353
- package/test/data/heat-capacitor-prices-NaN-test.json +0 -197
- package/test/data/lowest-price-bug184-input.json +0 -198
- package/test/data/lowest-price-bug184.json +0 -343
- package/test/data/lowest-price-bug187-input.json +0 -197
- package/test/data/lowest-price-bug187.json +0 -331
- package/test/data/lowest-price-input-missing-end.json +0 -198
- package/test/data/lowest-price-result-cont-max-fail.json +0 -20
- package/test/data/lowest-price-result-cont-max.json +0 -24
- package/test/data/lowest-price-result-cont.json +0 -29
- package/test/data/lowest-price-result-missing-end.json +0 -332
- package/test/data/lowest-price-result-neg-cont.json +0 -29
- package/test/data/lowest-price-result-neg-split.json +0 -23
- package/test/data/lowest-price-result-split-allday.json +0 -25
- package/test/data/lowest-price-result-split-allday10.json +0 -23
- package/test/data/lowest-price-result-split-max.json +0 -24
- package/test/data/lowest-price-result-split.json +0 -24
- package/test/data/merge-schedule-data.js +0 -264
- package/test/data/multiple-trades.json +0 -53
- package/test/data/negative-prices.json +0 -198
- package/test/data/nordpool-3-days-prices.json +0 -296
- package/test/data/nordpool-3-days-result.json +0 -451
- package/test/data/nordpool-current-state-prices.json +0 -283
- package/test/data/nordpool-event-prices.json +0 -190
- package/test/data/nordpool-events-state-2.json +0 -288
- package/test/data/nordpool-prices-in-payload.json +0 -287
- package/test/data/nordpool-zero-prices.json +0 -90
- package/test/data/prices.js +0 -106
- package/test/data/reconfigResult.js +0 -80
- package/test/data/reconfigResult_old.js +0 -141
- package/test/data/reconfigResult_old2.js +0 -75
- package/test/data/result.js +0 -180
- package/test/data/schedule-from-minutes-test-data.json +0 -365
- package/test/data/tibber-data-end-0-24h.json +0 -198
- package/test/data/tibber-data-end-0.json +0 -102
- package/test/data/tibber-decreasing-24h.json +0 -101
- package/test/data/tibber-decreasing2-24h.json +0 -101
- package/test/data/tibber-prices-single-home.json +0 -64
- package/test/data/tibber-prices.json +0 -124
- package/test/data/tibber-result-end-0-24h.json +0 -341
- package/test/data/tibber-result-end-0.json +0 -187
- package/test/data/tibber-result.json +0 -373
- package/test/data/v5-best-save-prices-1.json +0 -46
- package/test/data/v5-best-save-result-1.js +0 -34
- package/test/elvia.test.js +0 -40
- package/test/general-add-tariff-functions.test.js +0 -77
- package/test/general-add-tariff.test.js +0 -288
- package/test/mostSavedStrategy.test.js +0 -89
- package/test/receive-price-functions.test.js +0 -173
- package/test/receive-price.test.js +0 -168
- package/test/schedule-merger-functions.test.js +0 -91
- package/test/schedule-merger-test-utils.js +0 -27
- package/test/schedule-merger.test.js +0 -130
- package/test/send-config-input.test.js +0 -179
- package/test/strategy-best-save-bug-232.test.js +0 -51
- package/test/strategy-best-save-overlap.test.js +0 -52
- package/test/strategy-best-save-performance.test.js +0 -79
- package/test/strategy-best-save-test-utils.js +0 -38
- package/test/strategy-best-save.test.js +0 -245
- package/test/strategy-fixed-schedule.test.js +0 -117
- package/test/strategy-heat-capacitor-node.test.js +0 -285
- package/test/strategy-heat-capacitor.test.js +0 -151
- package/test/strategy-lowest-price-3days.test.js +0 -121
- package/test/strategy-lowest-price-bug184.test.js +0 -62
- package/test/strategy-lowest-price-bug187.test.js +0 -61
- package/test/strategy-lowest-price-bug231.test.js +0 -98
- package/test/strategy-lowest-price-functions.test.js +0 -40
- package/test/strategy-lowest-price-test-utils.js +0 -33
- package/test/strategy-lowest-price.test.js +0 -665
- package/test/test-utils.js +0 -107
- package/test/utils.test.js +0 -267
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-power-saver",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "A module for Node-RED that you can use to turn on and off a switch based on power prices",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"ps-strategy-lowest-price": "src/strategy-lowest-price.js",
|
|
27
27
|
"ps-strategy-heat-capacitor": "src/strategy-heat-capacitor.js",
|
|
28
28
|
"ps-strategy-fixed-schedule": "src/strategy-fixed-schedule.js",
|
|
29
|
+
"ps-light-saver": "src/light-saver.js",
|
|
29
30
|
"ps-schedule-merger": "src/schedule-merger.js",
|
|
30
31
|
"ps-elvia-config": "src/elvia/elvia-config.js",
|
|
31
32
|
"ps-elvia-tariff-types": "src/elvia/elvia-tariff-types.js",
|
|
@@ -46,27 +47,26 @@
|
|
|
46
47
|
"url": "https://github.com/ottopaulsen/node-red-contrib-power-saver.git"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@vuepress/bundler-vite": "2.0.0-rc.
|
|
50
|
-
"@vuepress/plugin-google-analytics": "2.0.0-rc.
|
|
51
|
-
"@vuepress/plugin-register-components": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-search": "2.0.0-rc.
|
|
53
|
-
"@vuepress/theme-default": "2.0.0-rc.
|
|
54
|
-
"@vuepress/utils": "2.0.0-rc.
|
|
55
|
-
"chai": "
|
|
56
|
-
"eslint": "
|
|
57
|
-
"expect": "
|
|
58
|
-
"mocha": "^11.
|
|
59
|
-
"node-red": "^4.
|
|
60
|
-
"node-red-node-test-helper": "0.3.
|
|
61
|
-
"sass-embedded": "^1.
|
|
62
|
-
"sass-loader": "^16.0.
|
|
63
|
-
"vuepress": "2.0.0-rc.
|
|
50
|
+
"@vuepress/bundler-vite": "2.0.0-rc.26",
|
|
51
|
+
"@vuepress/plugin-google-analytics": "2.0.0-rc.123",
|
|
52
|
+
"@vuepress/plugin-register-components": "2.0.0-rc.123",
|
|
53
|
+
"@vuepress/plugin-search": "2.0.0-rc.123",
|
|
54
|
+
"@vuepress/theme-default": "2.0.0-rc.123",
|
|
55
|
+
"@vuepress/utils": "2.0.0-rc.26",
|
|
56
|
+
"chai": "6.2.2",
|
|
57
|
+
"eslint": "10.0.0",
|
|
58
|
+
"expect": "30.2.0",
|
|
59
|
+
"mocha": "^11.7.5",
|
|
60
|
+
"node-red": "^4.1.5",
|
|
61
|
+
"node-red-node-test-helper": "0.3.6",
|
|
62
|
+
"sass-embedded": "^1.97.3",
|
|
63
|
+
"sass-loader": "^16.0.7",
|
|
64
|
+
"vuepress": "2.0.0-rc.26"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"floating-vue": "5.2.2",
|
|
67
68
|
"lodash.clonedeep": "4.5.0",
|
|
68
69
|
"luxon": "3.5.0",
|
|
69
|
-
"nano-time": "1.0.0"
|
|
70
|
-
"node-fetch": "2.6.7"
|
|
70
|
+
"nano-time": "1.0.0"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/elvia/elvia-api.js
CHANGED
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
|
|
203
203
|
<script type="text/html" data-template-name="ps-general-add-tariff">
|
|
204
204
|
<div class="form-row">
|
|
205
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
205
|
+
<label for="node-input-name" style="width: 200px"><i class="fa fa-tag"></i> Name</label>
|
|
206
206
|
<input type="text" id="node-input-name" placeholder="Name" />
|
|
207
207
|
</div>
|
|
208
208
|
|
|
@@ -215,19 +215,19 @@
|
|
|
215
215
|
</div>
|
|
216
216
|
|
|
217
217
|
<div class="form-row">
|
|
218
|
-
<label for="node-input-days-container"><i class="fa fa-calendar-o"></i> Days</label>
|
|
218
|
+
<label for="node-input-days-container" style="width: 200px"><i class="fa fa-calendar-o"></i> Days</label>
|
|
219
219
|
<span id="node-input-days-container"></span>
|
|
220
220
|
</div>
|
|
221
221
|
|
|
222
222
|
<h3>Optional:</h3>
|
|
223
223
|
|
|
224
224
|
<div class="form-row">
|
|
225
|
-
<label for="node-input-validFrom"><i class="fa fa-calendar"></i> Valid from date</label>
|
|
225
|
+
<label for="node-input-validFrom" style="width: 200px"><i class="fa fa-calendar"></i> Valid from date</label>
|
|
226
226
|
<input type="text" id="node-input-validFrom" placeholder="YYYY-MM-DD" />
|
|
227
227
|
</div>
|
|
228
228
|
|
|
229
229
|
<div class="form-row">
|
|
230
|
-
<label for="node-input-validTo"><i class="fa fa-calendar"></i> Valid to date</label>
|
|
230
|
+
<label for="node-input-validTo" style="width: 200px"><i class="fa fa-calendar"></i> Valid to date</label>
|
|
231
231
|
<input type="text" id="node-input-validTo" placeholder="YYYY-MM-DD" />
|
|
232
232
|
</div>
|
|
233
233
|
</script>
|