node-red-contrib-power-saver 3.0.0 → 3.0.4

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 (76) hide show
  1. package/.github/FUNDING.yml +12 -0
  2. package/docs/.vuepress/dist/404.html +3 -3
  3. package/docs/.vuepress/dist/assets/js/app.6191e356.js +1 -0
  4. package/docs/.vuepress/dist/assets/js/runtime~app.62fa6694.js +1 -0
  5. package/docs/.vuepress/dist/assets/js/v-08683c60.07fe8291.js +1 -0
  6. package/docs/.vuepress/dist/assets/js/v-0aca7ba6.aec5ba75.js +1 -0
  7. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.d008d8bc.js +1 -0
  8. package/docs/.vuepress/dist/assets/js/v-1ad821fa.85407071.js +1 -0
  9. package/docs/.vuepress/dist/assets/js/v-30acb564.73b8e29f.js +1 -0
  10. package/docs/.vuepress/dist/assets/js/v-4637f9e4.22ab9413.js +1 -0
  11. package/docs/.vuepress/dist/assets/js/v-510ed0d4.481e9be8.js +1 -0
  12. package/docs/.vuepress/dist/assets/js/v-5954bcb2.be07962c.js +1 -0
  13. package/docs/.vuepress/dist/assets/js/v-5db8da3a.ac192f35.js +1 -0
  14. package/docs/.vuepress/dist/assets/js/v-61f728ca.802ab15e.js +1 -0
  15. package/docs/.vuepress/dist/assets/js/v-677dfaed.9bbbd037.js +1 -0
  16. package/docs/.vuepress/dist/assets/js/v-7c87f26e.457a1a60.js +1 -0
  17. package/docs/.vuepress/dist/assets/js/{v-8daa1a0e.1ea39527.js → v-8daa1a0e.db8b59c6.js} +1 -1
  18. package/docs/.vuepress/dist/assets/js/v-b4a42144.6e0c5aa0.js +1 -0
  19. package/docs/.vuepress/dist/assets/js/v-e8c55052.5f85b6cd.js +1 -0
  20. package/docs/.vuepress/dist/assets/js/v-fffb8e28.e815e852.js +1 -0
  21. package/docs/.vuepress/dist/changelog/index.html +3 -3
  22. package/docs/.vuepress/dist/contribute/index.html +3 -3
  23. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +3 -3
  24. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +3 -3
  25. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +3 -3
  26. package/docs/.vuepress/dist/examples/index.html +3 -3
  27. package/docs/.vuepress/dist/guide/index.html +3 -3
  28. package/docs/.vuepress/dist/index.html +2 -2
  29. package/docs/.vuepress/dist/nodes/index.html +3 -3
  30. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +3 -3
  31. package/docs/.vuepress/dist/nodes/power-saver.html +3 -3
  32. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +3 -3
  33. package/docs/.vuepress/dist/nodes/ps-receive-price.html +3 -3
  34. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +3 -3
  35. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +3 -3
  36. package/docs/.vuepress/dist/nodes/strategy-input.html +3 -3
  37. package/docs/changelog/README.md +20 -0
  38. package/docs/contribute/README.md +1 -1
  39. package/docs/guide/README.md +10 -1
  40. package/package.json +1 -1
  41. package/src/elvia/elvia-config.html +3 -1
  42. package/src/elvia/elvia-config.js +7 -13
  43. package/src/elvia/elvia-tariff-types.js +8 -6
  44. package/src/elvia/elvia-tariff.js +1 -5
  45. package/src/handle-input.js +8 -5
  46. package/src/power-saver.html +8 -8
  47. package/src/receive-price-functions.js +14 -10
  48. package/src/receive-price.js +2 -2
  49. package/src/strategy-best-save.html +8 -8
  50. package/src/strategy-lowest-price.html +11 -11
  51. package/src/strategy-lowest-price.js +3 -3
  52. package/test/data/converted-prices.json +1 -0
  53. package/test/data/tibber-data-end-0-24h.json +197 -0
  54. package/test/data/tibber-data-end-0.json +101 -0
  55. package/test/data/tibber-result-end-0-24h.json +320 -0
  56. package/test/data/tibber-result-end-0.json +168 -0
  57. package/test/receive-price-functions.test.js +20 -0
  58. package/test/receive-price.test.js +4 -4
  59. package/test/strategy-lowest-price.test.js +200 -0
  60. package/docs/.vuepress/dist/assets/js/app.80d4373d.js +0 -1
  61. package/docs/.vuepress/dist/assets/js/runtime~app.665b411c.js +0 -1
  62. package/docs/.vuepress/dist/assets/js/v-08683c60.9edcaa60.js +0 -1
  63. package/docs/.vuepress/dist/assets/js/v-0aca7ba6.5eca5160.js +0 -1
  64. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.c02472fb.js +0 -1
  65. package/docs/.vuepress/dist/assets/js/v-1ad821fa.a628e907.js +0 -1
  66. package/docs/.vuepress/dist/assets/js/v-30acb564.80b4190d.js +0 -1
  67. package/docs/.vuepress/dist/assets/js/v-4637f9e4.df94c6ea.js +0 -1
  68. package/docs/.vuepress/dist/assets/js/v-510ed0d4.a78d8542.js +0 -1
  69. package/docs/.vuepress/dist/assets/js/v-5954bcb2.4f4712f3.js +0 -1
  70. package/docs/.vuepress/dist/assets/js/v-5db8da3a.2e49b81a.js +0 -1
  71. package/docs/.vuepress/dist/assets/js/v-61f728ca.7b545524.js +0 -1
  72. package/docs/.vuepress/dist/assets/js/v-677dfaed.756e0fb5.js +0 -1
  73. package/docs/.vuepress/dist/assets/js/v-7c87f26e.57507077.js +0 -1
  74. package/docs/.vuepress/dist/assets/js/v-b4a42144.a812c440.js +0 -1
  75. package/docs/.vuepress/dist/assets/js/v-e8c55052.30f30acd.js +0 -1
  76. package/docs/.vuepress/dist/assets/js/v-fffb8e28.850019c1.js +0 -1
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: ottopaulsen
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -5,11 +5,11 @@
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
6
  <meta name="generator" content="VuePress 2.0.0-beta.27">
7
7
  <script src="https://c6.patreon.com/becomePatronButton.bundle.js"></script><link rel="icon" href="/euro.png"><title>Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
- <link rel="preload" href="/node-red-contrib-power-saver/assets/js/runtime~app.665b411c.js" as="script"><link rel="preload" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css" as="style"><link rel="preload" href="/node-red-contrib-power-saver/assets/js/812.79dad458.js" as="script"><link rel="preload" href="/node-red-contrib-power-saver/assets/js/app.80d4373d.js" as="script">
8
+ <link rel="preload" href="/node-red-contrib-power-saver/assets/js/runtime~app.62fa6694.js" as="script"><link rel="preload" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css" as="style"><link rel="preload" href="/node-red-contrib-power-saver/assets/js/812.79dad458.js" as="script"><link rel="preload" href="/node-red-contrib-power-saver/assets/js/app.6191e356.js" as="script">
9
9
  <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><div class="theme-default-content"><h1>404</h1><blockquote>There&#39;s nothing here.</blockquote><a href="/node-red-contrib-power-saver/" class="">Take me home</a></div></div><!----><!--]--></div>
13
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.665b411c.js" defer></script><script src="/node-red-contrib-power-saver/assets/js/812.79dad458.js" defer></script><script src="/node-red-contrib-power-saver/assets/js/app.80d4373d.js" defer></script>
12
+ <div id="app"><!--[--><div class="theme-container"><div class="theme-default-content"><h1>404</h1><blockquote>How did we get here?</blockquote><a href="/node-red-contrib-power-saver/" class="">Take me home</a></div></div><!----><!--]--></div>
13
+ <script src="/node-red-contrib-power-saver/assets/js/runtime~app.62fa6694.js" defer></script><script src="/node-red-contrib-power-saver/assets/js/812.79dad458.js" defer></script><script src="/node-red-contrib-power-saver/assets/js/app.6191e356.js" defer></script>
14
14
  </body>
15
15
  </html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[143],{3131:(e,t,n)=>{n.d(t,{g:()=>s});var a=n(2009),d=n(6971),o=n(1598);const s=[a.Z,d.Z,o.Z]},9947:(e,t,n)=>{n.d(t,{p:()=>a});const a=[n(3051).Z]},4611:(e,t,n)=>{n.d(t,{l:()=>s});var a=n(8866),d=n(1263),o=n(6243);const s=[a.Z,d.Z,o.Z]},4150:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(6252);const d={404:(0,a.RC)((()=>n.e(491).then(n.bind(n,8491)))),Layout:(0,a.RC)((()=>n.e(293).then(n.bind(n,3293))))}},6056:(e,t,n)=>{n.d(t,{b:()=>d});var a=n(6252);const d={"v-8daa1a0e":(0,a.RC)((()=>n.e(509).then(n.bind(n,1829)))),"v-510ed0d4":(0,a.RC)((()=>n.e(495).then(n.bind(n,7478)))),"v-7c87f26e":(0,a.RC)((()=>n.e(889).then(n.bind(n,1787)))),"v-0aca7ba6":(0,a.RC)((()=>n.e(27).then(n.bind(n,1701)))),"v-61f728ca":(0,a.RC)((()=>n.e(283).then(n.bind(n,8156)))),"v-30acb564":(0,a.RC)((()=>n.e(901).then(n.bind(n,2870)))),"v-5db8da3a":(0,a.RC)((()=>n.e(625).then(n.bind(n,3350)))),"v-fffb8e28":(0,a.RC)((()=>n.e(807).then(n.bind(n,4595)))),"v-e8c55052":(0,a.RC)((()=>n.e(651).then(n.bind(n,4493)))),"v-b4a42144":(0,a.RC)((()=>n.e(407).then(n.bind(n,3838)))),"v-1ad821fa":(0,a.RC)((()=>n.e(22).then(n.bind(n,8718)))),"v-08683c60":(0,a.RC)((()=>n.e(332).then(n.bind(n,6250)))),"v-677dfaed":(0,a.RC)((()=>n.e(745).then(n.bind(n,1253)))),"v-0b5e3c8c":(0,a.RC)((()=>n.e(363).then(n.bind(n,6112)))),"v-4637f9e4":(0,a.RC)((()=>n.e(418).then(n.bind(n,1255)))),"v-5954bcb2":(0,a.RC)((()=>n.e(317).then(n.bind(n,8638)))),"v-3706649a":(0,a.RC)((()=>n.e(88).then(n.bind(n,8109))))}},9706:(e,t,n)=>{n.d(t,{T:()=>a});const a={"v-8daa1a0e":()=>n.e(509).then(n.bind(n,6464)).then((({data:e})=>e)),"v-510ed0d4":()=>n.e(495).then(n.bind(n,3707)).then((({data:e})=>e)),"v-7c87f26e":()=>n.e(889).then(n.bind(n,9459)).then((({data:e})=>e)),"v-0aca7ba6":()=>n.e(27).then(n.bind(n,7726)).then((({data:e})=>e)),"v-61f728ca":()=>n.e(283).then(n.bind(n,4773)).then((({data:e})=>e)),"v-30acb564":()=>n.e(901).then(n.bind(n,8835)).then((({data:e})=>e)),"v-5db8da3a":()=>n.e(625).then(n.bind(n,8682)).then((({data:e})=>e)),"v-fffb8e28":()=>n.e(807).then(n.bind(n,9570)).then((({data:e})=>e)),"v-e8c55052":()=>n.e(651).then(n.bind(n,3029)).then((({data:e})=>e)),"v-b4a42144":()=>n.e(407).then(n.bind(n,7952)).then((({data:e})=>e)),"v-1ad821fa":()=>n.e(22).then(n.bind(n,2336)).then((({data:e})=>e)),"v-08683c60":()=>n.e(332).then(n.bind(n,5845)).then((({data:e})=>e)),"v-677dfaed":()=>n.e(745).then(n.bind(n,7951)).then((({data:e})=>e)),"v-0b5e3c8c":()=>n.e(363).then(n.bind(n,3594)).then((({data:e})=>e)),"v-4637f9e4":()=>n.e(418).then(n.bind(n,3959)).then((({data:e})=>e)),"v-5954bcb2":()=>n.e(317).then(n.bind(n,1535)).then((({data:e})=>e)),"v-3706649a":()=>n.e(88).then(n.bind(n,1801)).then((({data:e})=>e))}},4634:(e,t,n)=>{n.d(t,{g:()=>d});var a=n(4802);const d=[["v-8daa1a0e","/","",["/index.html","/README.md"]],["v-510ed0d4","/changelog/","Change Log",["/changelog/index.html","/changelog/README.md"]],["v-7c87f26e","/contribute/","Contribute",["/contribute/index.html","/contribute/README.md"]],["v-0aca7ba6","/examples/","Examples",["/examples/index.html","/examples/README.md"]],["v-61f728ca","/examples/example-nordpool-current-state.html","Nord Pool and current state node",["/examples/example-nordpool-current-state","/examples/example-nordpool-current-state.md"]],["v-30acb564","/examples/example-nordpool-events-state.html","Nord Pool and events: state node",["/examples/example-nordpool-events-state","/examples/example-nordpool-events-state.md"]],["v-5db8da3a","/examples/example-tibber-mqtt.html","Tibber, a switch and MQTT",["/examples/example-tibber-mqtt","/examples/example-tibber-mqtt.md"]],["v-fffb8e28","/guide/","Guide",["/guide/index.html","/guide/README.md"]],["v-e8c55052","/nodes/","Nodes",["/nodes/index.html","/nodes/README.md"]],["v-b4a42144","/nodes/old-power-saver-doc.html","node-red-contrib-power-saver v2 (deprecated)",["/nodes/old-power-saver-doc","/nodes/old-power-saver-doc.md"]],["v-1ad821fa","/nodes/power-saver.html","power-saver",["/nodes/power-saver","/nodes/power-saver.md"]],["v-08683c60","/nodes/ps-elvia-add-tariff.html","ps-elvia-add-tariff",["/nodes/ps-elvia-add-tariff","/nodes/ps-elvia-add-tariff.md"]],["v-677dfaed","/nodes/ps-receive-price.html","ps-receive-price",["/nodes/ps-receive-price","/nodes/ps-receive-price.md"]],["v-0b5e3c8c","/nodes/ps-strategy-best-save.html","ps-strategy-best-save",["/nodes/ps-strategy-best-save","/nodes/ps-strategy-best-save.md"]],["v-4637f9e4","/nodes/ps-strategy-lowest-price.html","ps-strategy-lowest-price",["/nodes/ps-strategy-lowest-price","/nodes/ps-strategy-lowest-price.md"]],["v-5954bcb2","/nodes/strategy-input.html","Strategy input format",["/nodes/strategy-input","/nodes/strategy-input.md"]],["v-3706649a","/404.html","",["/404"]]].reduce(((e,[t,n,d,o])=>(e.push({name:t,path:n,component:a.Y,meta:{title:d}},...o.map((e=>({path:e,redirect:n})))),e)),[{name:"404",path:"/:catchAll(.*)",component:a.Y}])},5220:(e,t,n)=>{n.d(t,{H:()=>a});const a={base:"/node-red-contrib-power-saver/",lang:"en-US",title:"Power Saver",description:"A Node-RED note to save money on hourly changing power prices",head:[["script",{src:"https://c6.patreon.com/becomePatronButton.bundle.js"}],["link",{rel:"icon",href:"/euro.png"}]],locales:{}}},2232:(e,t,n)=>{n.d(t,{f:()=>a});const a={navbar:[{text:"Guide",link:"/guide/"},{text:"Nodes",link:"/nodes/"},{text:"Examples",link:"/examples/"},{text:"Contribute",link:"/contribute/"},{text:"Changes",link:"/changelog/"}],sidebar:{"/guide/":[{text:"Guide",children:["/guide/README.md"]}],"/nodes/":[{text:"Nodes",children:[{text:"Power Saver",link:"/nodes/power-saver.md"},{text:"Strategy nodes",children:["/nodes/ps-strategy-best-save.md","/nodes/ps-strategy-lowest-price.md"]},{text:"Utility nodes",children:["/nodes/ps-receive-price.md"]},{text:"Grid tariff nodes",children:["/nodes/ps-elvia-add-tariff.md"]}]},{text:"Data format",children:["/nodes/strategy-input.md"]}],"/examples/":[{text:"Examples",children:["/examples/example-nordpool-current-state.md","/examples/example-nordpool-events-state.md","/examples/example-tibber-mqtt.md"]}],"/contribute/":"auto","/changelog/":"auto"},locales:{"/":{selectLanguageName:"English"}},logo:null,darkMode:!0,repo:null,selectLanguageText:"Languages",selectLanguageAriaLabel:"Select language",sidebarDepth:2,editLink:!0,editLinkText:"Edit this page",lastUpdated:!0,lastUpdatedText:"Last Updated",contributors:!0,contributorsText:"Contributors",notFound:["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],backToHome:"Take me home",openInNewWindow:"open in new window",toggleDarkMode:"toggle dark mode",toggleSidebar:"toggle sidebar"}}},e=>{e.O(0,[460,812],(()=>(5698,e(e.s=5698)))),e.O()}]);
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e,r,t,a={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return a[e].call(t.exports,t,t.exports,n),t.exports}n.m=a,e=[],n.O=(r,t,a,o)=>{if(!t){var d=1/0;for(v=0;v<e.length;v++){for(var[t,a,o]=e[v],i=!0,c=0;c<t.length;c++)(!1&o||d>=o)&&Object.keys(n.O).every((e=>n.O[e](t[c])))?t.splice(c--,1):(i=!1,o<d&&(d=o));if(i){e.splice(v--,1);var s=a();void 0!==s&&(r=s)}}return r}o=o||0;for(var v=e.length;v>0&&e[v-1][2]>o;v--)e[v]=e[v-1];e[v]=[t,a,o]},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>"assets/js/"+({22:"v-1ad821fa",27:"v-0aca7ba6",88:"v-3706649a",283:"v-61f728ca",317:"v-5954bcb2",332:"v-08683c60",363:"v-0b5e3c8c",407:"v-b4a42144",418:"v-4637f9e4",495:"v-510ed0d4",509:"v-8daa1a0e",625:"v-5db8da3a",651:"v-e8c55052",745:"v-677dfaed",807:"v-fffb8e28",889:"v-7c87f26e",901:"v-30acb564"}[e]||e)+"."+{22:"85407071",27:"aec5ba75",88:"d7f73384",283:"802ab15e",293:"5e967839",317:"be07962c",332:"07fe8291",363:"d008d8bc",407:"6e0c5aa0",418:"22ab9413",491:"c183eba3",495:"481e9be8",509:"db8b59c6",625:"ac192f35",651:"5f85b6cd",745:"9bbbd037",807:"e815e852",889:"457a1a60",901:"73b8e29f"}[e]+".js",n.miniCssF=e=>{},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="node-red-contrib-power-saver:",n.l=(e,a,o,d)=>{if(r[e])r[e].push(a);else{var i,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),v=0;v<s.length;v++){var b=s[v];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")==t+o){i=b;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+o),i.src=e),r[e]=[a];var l=(t,a)=>{i.onerror=i.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(a))),t)return t(a)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=l.bind(null,i.onerror),i.onload=l.bind(null,i.onload),c&&document.head.appendChild(i)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/node-red-contrib-power-saver/",(()=>{var e={523:0,460:0};n.f.j=(r,t)=>{var a=n.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else if(/^(460|523)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>a=e[r]=[t,o]));t.push(a[2]=o);var d=n.p+n.u(r),i=new Error;n.l(d,(t=>{if(n.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),d=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+d+")",i.name="ChunkLoadError",i.type=o,i.request=d,a[1](i)}}),"chunk-"+r,r)}},n.O.j=r=>0===e[r];var r=(r,t)=>{var a,o,[d,i,c]=t,s=0;if(d.some((r=>0!==e[r]))){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(c)var v=c(n)}for(r&&r(t);s<d.length;s++)o=d[s],n.o(e,o)&&e[o]&&e[o][0](),e[d[s]]=0;return n.O(v)},t=self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[332],{5845:(e,t,i)=>{i.r(t),i.d(t,{data:()=>a});const a={key:"v-08683c60",path:"/nodes/ps-elvia-add-tariff.html",title:"ps-elvia-add-tariff",lang:"en-US",frontmatter:{},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Configuration",slug:"configuration",children:[]},{level:2,title:"Input",slug:"input",children:[]},{level:2,title:"Output",slug:"output",children:[]}],filePathRelative:"nodes/ps-elvia-add-tariff.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},6250:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var a=i(6252),n=i(5824),o=i(2101),r=i(223),s=i(9858),l=i(6473),u=i(5307);const d=(0,a._)("h1",{id:"ps-elvia-add-tariff",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#ps-elvia-add-tariff","aria-hidden":"true"},"#"),(0,a.Uk)(" ps-elvia-add-tariff")],-1),p=(0,a._)("p",null,[(0,a._)("img",{src:n,alt:"ps-elvia-add-tariff"})],-1),c=(0,a._)("p",null,"Node to add grid tariff from Elvia.",-1),f=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"Elvia API"),(0,a._)("p",null,[(0,a.Uk)("You need an Elvia API subscription key to use this node. See "),(0,a._)("a",{href:"#elvia-configuration"},"configuration"),(0,a.Uk)(".")])],-1),h=(0,a._)("h2",{id:"description",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,a.Uk)(" Description")],-1),g=(0,a._)("p",null,[(0,a.Uk)("When grid tariff changes from hour to hour, this should normally also be considered when finding the most favorable hours to use power. This node retrieves prices from Elvia, so if you are an elvia customer, you can put this node between the "),(0,a._)("code",null,"ps-receive-price"),(0,a.Uk)(" node and the strategy nodes. When configured, it will add Elvia tariff to the power prices before doing the calculation:")],-1),_=(0,a._)("p",null,[(0,a._)("img",{src:o,alt:"Elvia flow"})],-1),v=(0,a._)("h2",{id:"configuration",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#configuration","aria-hidden":"true"},"#"),(0,a.Uk)(" Configuration")],-1),m={class:"custom-container warning"},b=(0,a._)("p",{class:"custom-container-title"},"Elvia API subscription key",-1),k=(0,a.Uk)("This node uses the Elvia API, and you must get your own Elvia API subscription key in order to use it. Go to the "),y={href:"https://elvia.portal.azure-api.net/",target:"_blank",rel:"noopener noreferrer"},U=(0,a.Uk)("Elvia Developer Portal"),w=(0,a.Uk)(" to sign up, and then request for a subscription to the GridTariffAPI. When your subscription is approved, you will find your subscription key in the "),E={href:"https://elvia.portal.azure-api.net/developer",target:"_blank",rel:"noopener noreferrer"},x=(0,a.Uk)("developer portal"),P=(0,a.Uk)(" under Your subscriptions."),I=(0,a._)("p",null,[(0,a.Uk)("The first time you use this node, you must create a "),(0,a._)("code",null,"ps-elvia-config"),(0,a.Uk)(" entry. Click on the edit button to the right of Elvia Config:")],-1),T=(0,a._)("p",null,[(0,a._)("img",{src:r,alt:"Elvia configuration"})],-1),A=(0,a._)("p",null,"Then enter the Elvia API subscription key:",-1),W=(0,a._)("p",null,[(0,a._)("img",{src:s,alt:"Elvia configuration"})],-1),C=(0,a._)("p",null,"After entering the Elvia API subscription key the first time, it is not possible to select tariff.",-1),O=(0,a._)("p",null,[(0,a._)("img",{src:l,alt:"Elvia configuration"})],-1),D=(0,a._)("p",null,"To fix that, save the config, deploy, and then open the node again. Now you should be able to select the right tariff:",-1),Y=(0,a._)("p",null,[(0,a._)("img",{src:u,alt:"Elvia configuration"})],-1),z=(0,a._)("p",null,"The next time you use this node, you can select the same config as you created the first time, and then you can also select tariff immediately.",-1),G=(0,a._)("h2",{id:"input",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#input","aria-hidden":"true"},"#"),(0,a.Uk)(" Input")],-1),L=(0,a.Uk)("The input is the "),N=(0,a.Uk)("common strategy input format"),R=(0,a._)("h2",{id:"output",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output","aria-hidden":"true"},"#"),(0,a.Uk)(" Output")],-1),S=(0,a.Uk)("The input is the "),Z=(0,a.Uk)("common strategy input format"),q={},H=(0,i(3744).Z)(q,[["render",function(e,t){const i=(0,a.up)("OutboundLink"),n=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[d,p,c,f,h,g,_,v,(0,a._)("div",m,[b,(0,a._)("p",null,[k,(0,a._)("a",y,[U,(0,a.Wm)(i)]),w,(0,a._)("a",E,[x,(0,a.Wm)(i)]),P])]),I,T,A,W,C,O,D,Y,z,G,(0,a._)("p",null,[L,(0,a.Wm)(n,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[N])),_:1})]),R,(0,a._)("p",null,[S,(0,a.Wm)(n,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[Z])),_:1})])],64)}]])},3744:(e,t)=>{t.Z=(e,t)=>{const i=e.__vccOpts||e;for(const[e,a]of t)i[e]=a;return i}},223:(e,t,i)=>{e.exports=i.p+"assets/img/elvia-config-no-config.b4bb972c.png"},6473:(e,t,i)=>{e.exports=i.p+"assets/img/elvia-config-no-tariff.3f89aba8.png"},5307:(e,t,i)=>{e.exports=i.p+"assets/img/elvia-config-select-tariff.0f73fd56.png"},9858:(e,t,i)=>{e.exports=i.p+"assets/img/elvia-config-subscription-key.8be8ab8a.png"},2101:(e,t,i)=>{e.exports=i.p+"assets/img/elvia-flow.bae2a4d5.png"},5824:(e,t,i)=>{e.exports=i.p+"assets/img/node-ps-elvia-add-tariff.94ea2b09.png"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[27],{7726:(e,a,t)=>{t.r(a),t.d(a,{data:()=>r});const r={key:"v-0aca7ba6",path:"/examples/",title:"Examples",lang:"en-US",frontmatter:{},excerpt:"",headers:[],filePathRelative:"examples/README.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},1701:(e,a,t)=>{t.r(a),t.d(a,{default:()=>n});const r=(0,t(6252).uE)('<h1 id="examples" tabindex="-1"><a class="header-anchor" href="#examples" aria-hidden="true">#</a> Examples</h1><p><a href="./example-nordpool-current-state">Nord Pool and <code>current state</code> node in HA</a><br><a href="./example-nordpool-events-state">Nord Pool and <code>events: state</code> node in HA</a><br><a href="./example-tibber-mqtt">Tibber and mqtt</a></p>',2),o={},n=(0,t(3744).Z)(o,[["render",function(e,a){return r}]])},3744:(e,a)=>{a.Z=(e,a)=>{const t=e.__vccOpts||e;for(const[e,r]of a)t[e]=r;return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[363],{3594:(e,n,s)=>{s.r(n),s.d(n,{data:()=>a});const a={key:"v-0b5e3c8c",path:"/nodes/ps-strategy-best-save.html",title:"ps-strategy-best-save",lang:"en-US",frontmatter:{},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Configuration",slug:"configuration",children:[{level:3,title:"Dynamic config",slug:"dynamic-config",children:[]}]},{level:2,title:"Input",slug:"input",children:[]},{level:2,title:"Output",slug:"output",children:[{level:3,title:"Output 1",slug:"output-1",children:[]},{level:3,title:"Output 2",slug:"output-2",children:[]},{level:3,title:"Output 3",slug:"output-3",children:[]}]},{level:2,title:"Algorithm",slug:"algorithm",children:[]},{level:2,title:"Integration with MagicMirror",slug:"integration-with-magicmirror",children:[]}],filePathRelative:"nodes/ps-strategy-best-save.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},6112:(e,n,s)=>{s.r(n),s.d(n,{default:()=>ae});var a=s(6252),t=s(7188);const o=(0,a._)("h1",{id:"ps-strategy-best-save",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#ps-strategy-best-save","aria-hidden":"true"},"#"),(0,a.Uk)(" ps-strategy-best-save")],-1),r=(0,a._)("p",null,[(0,a._)("img",{src:t,alt:"ps-strategy-best-save"})],-1),l=(0,a._)("p",null,"Strategy node to postpone power consumption until the price is lower.",-1),i=(0,a._)("h2",{id:"description",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,a.Uk)(" Description")],-1),u=(0,a._)("p",null,"This strategy turns off the hours where the price difference is largest compared to the next hour that is on. The idea is that the power you are not using when the switch is turned off, will be used immediately when the switch is turned on. This would fit well for turning off a water heater or another thermostat controlled heater.",-1),p=(0,a._)("p",null,[(0,a.Uk)("The picture at the bottom of the page, under "),(0,a._)("a",{href:"#integration-with-magicmirror"},"Integration with MagicMirror"),(0,a.Uk)(", illustrates this by the purple strokes, taking the price from the top of the price curve to the level of the first hour after the save-period.")],-1),c=(0,a._)("h2",{id:"configuration",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#configuration","aria-hidden":"true"},"#"),(0,a.Uk)(" Configuration")],-1),_=(0,a._)("p",null,[(0,a._)("img",{src:"/best-save-config.png",alt:"Best Save Config"})],-1),h=(0,a._)("table",null,[(0,a._)("thead",null,[(0,a._)("tr",null,[(0,a._)("th",null,"Value"),(0,a._)("th",null,"Description")])]),(0,a._)("tbody",null,[(0,a._)("tr",null,[(0,a._)("td",null,"Max per sequence"),(0,a._)("td",null,"Maximum number of hours to turn off in a sequence.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Min recover"),(0,a._)("td",null,"Minimum hours to turn on immediately after a period when turned off the maximum number of hours that is allowed to be turned off")]),(0,a._)("tr",null,[(0,a._)("td",null,"Min saving"),(0,a._)("td",null,"Minimum amount to save per kWh in order to bother turning it off. It is recommended to have some amount here, e.g. 2 cents / 2 øre. No point in saving 0.001, is it?")]),(0,a._)("tr",null,[(0,a._)("td",null,"Schedule for"),(0,a._)("td",null,"Select to schedule for the whole data set or only from the current hour.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Send when rescheduling"),(0,a._)("td",null,"Check this to make sure on or off output is sent immediately after rescheduling")]),(0,a._)("tr",null,[(0,a._)("td",null,"If no schedule, send"),(0,a._)("td",null,"What to do if there is no valid schedule any more (turn on or off).")])])],-1),k=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"Min recover"),(0,a._)("p",null,[(0,a.Uk)("NB! The "),(0,a._)("code",null,"Min recover"),(0,a.Uk)(" only has effect if the previous save-period is of length "),(0,a._)("code",null,"Max per sequence"),(0,a.Uk)(". If the save-period is shorter, the following on-period may be as short as one hour.")])],-1),d=(0,a._)("h3",{id:"dynamic-config",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-config","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic config")],-1),b=(0,a._)("p",null,"It is possible to change config dynamically by sending a config message to the node. The config messages has a payload with a config object like this example:",-1),m=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"maxHoursToSaveInSequence"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"4"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"minHoursOnAfterMaxSequenceSaved"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"2"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"minSaving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.02"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"scheduleOnlyFromCurrentTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br")])],-1),g=(0,a._)("p",null,"All the variables in the config object are optional. You can send only those you want to change.",-1),f=(0,a._)("p",null,"The config sent like this will be valid until a new config is sent the same way, or until the flow is restarted. On a restart, the original config set up in the node will be used.",-1),U=(0,a._)("p",null,"When a config is sent like this, the schedule will be replanned based on the last previously received price data. If no price data has been received, no scheduling is done.",-1),y=(0,a._)("h2",{id:"input",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#input","aria-hidden":"true"},"#"),(0,a.Uk)(" Input")],-1),v=(0,a.Uk)("The input is the "),w=(0,a.Uk)("common strategy input format"),M=(0,a._)("h2",{id:"output",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output","aria-hidden":"true"},"#"),(0,a.Uk)(" Output")],-1),x=(0,a._)("p",null,"There are three outputs. You use only those you need for your purpose.",-1),T=(0,a._)("h3",{id:"output-1",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output-1","aria-hidden":"true"},"#"),(0,a.Uk)(" Output 1")],-1),q=(0,a._)("p",null,[(0,a.Uk)("A payload with the word "),(0,a._)("code",null,"true"),(0,a.Uk)(" is sent to output 1 whenever the power / switch shall be turned on.")],-1),I=(0,a._)("h3",{id:"output-2",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output-2","aria-hidden":"true"},"#"),(0,a.Uk)(" Output 2")],-1),S=(0,a._)("p",null,[(0,a.Uk)("A payload with the word "),(0,a._)("code",null,"false"),(0,a.Uk)(" is sent to output 2 whenever the power / switch shall be turned off.")],-1),O=(0,a._)("h3",{id:"output-3",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output-3","aria-hidden":"true"},"#"),(0,a.Uk)(" Output 3")],-1),W=(0,a._)("p",null,"When a valid input is received, and the schedule is recalculated, the resulting schedule, as well as some other information, is sent to output 3. You can use this to see the plan and verify that it meets your expectations. You can also use it to display the schedule in any way you like.",-1),A=(0,a._)("p",null,"Example of output:",-1),C=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"schedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T00:00:00.000+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T01:00:00.000+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hours"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"1.2584"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T00:00:00.000+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.2034"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"1.055"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T01:00:00.000+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"1.2054"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T02:00:00.000+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"source"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"Nord Pool"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"maxHoursToSaveInSequence"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"3"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"minHoursOnAfterMaxSequenceSaved"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"1"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"minSaving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.001"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"12"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"13"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"14"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"15"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"16"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"17"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"18"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"19"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"20"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"21"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"22"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"23"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"24"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"25"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"26"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"27"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"28"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"29"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"30"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"31"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"32"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"33"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"34"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"35"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"36"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"37"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"38"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"39"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"40"),(0,a._)("br")])],-1),j=(0,a._)("p",null,[(0,a.Uk)("The "),(0,a._)("code",null,"schedule"),(0,a.Uk)(" array shows every time the switch is turned on or off. The "),(0,a._)("code",null,"hours"),(0,a.Uk)(" array shows values per hour containing the price (received as input), whether that hour is on or off, the start time of the hour and the amount per kWh that is saved on hours that are turned off, compared to the next hour that is on.")],-1),D=(0,a._)("h2",{id:"algorithm",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#algorithm","aria-hidden":"true"},"#"),(0,a.Uk)(" Algorithm")],-1),N=(0,a._)("p",null,"The calculation that decides what hours to turn off works as follows:",-1),H=(0,a._)("ol",null,[(0,a._)("li",null,"A matrix (x * y) is created where x is the number of hours we have price information for, and y is the configured maximum number of hours to turn off in a sequence."),(0,a._)("li",null,"The matrix is filled with how much you save by turning off hour x for y hours."),(0,a._)("li",null,"The matrix is processed calculating all possibilities for turning off a number of hours in a sequence and by that saving money. In this process all non-saving sequences are discarded. Also, if the average saving per hour is less than what you have configured as minimum amount to save per kWh, the sequence is discarded."),(0,a._)("li",null,"The remaining sequences are sorted by how much that is saved, in descending order."),(0,a._)("li",null,'Next, a table with one value per hour is created, with all hours in state "on".'),(0,a._)("li",null,"Then the saving sequences is applied one by one, turning off the hours in each sequence, discarding sequences that lead to any violation of the rules set by the config."),(0,a._)("li",null,"When all sequences are processed, the resulting table shows a pretty good savings plan, that in most cases would be the optimal plan.")],-1),R=(0,a._)("p",null,'I say "in most cases", because there is a chance that a group of two or more sequences combined can give a better plan than a single sequence preceeding those two, but where the selection of the one sequence causes the group to be discarded. If anyone encounters this situation, I would be happy to receive the price data set, and try to improve the algorithm even further.',-1),Y=(0,a._)("h2",{id:"integration-with-magicmirror",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#integration-with-magicmirror","aria-hidden":"true"},"#"),(0,a.Uk)(" Integration with MagicMirror")],-1),P=(0,a.Uk)("Are you using "),V={href:"https://magicmirror.builders/",target:"_blank",rel:"noopener noreferrer"},B=(0,a.Uk)("MagicMirror"),L=(0,a.Uk)("? Are you also using "),Z={href:"https://tibber.com/",target:"_blank",rel:"noopener noreferrer"},E=(0,a.Uk)("Tibber"),F=(0,a.Uk)("? If so, there is a module for MM called "),z={href:"https://github.com/ottopaulsen/MMM-Tibber",target:"_blank",rel:"noopener noreferrer"},G=(0,a.Uk)("MMM-Tibber"),J=(0,a.Uk)(", that easily can be used to show savings from this node."),K=(0,a._)("p",null,[(0,a._)("img",{src:"https://github.com/ottopaulsen/MMM-Tibber/blob/master/doc/MMM-Tibber-screenshot-savings-graph.png?raw=true",alt:"Show savings in MMM-Tibber"})],-1),Q=(0,a._)("p",null,"The purple lines show savings per kWh.",-1),X=(0,a.Uk)("Read more about this in the "),$={href:"https://github.com/ottopaulsen/MMM-Tibber#show-savings",target:"_blank",rel:"noopener noreferrer"},ee=(0,a.Uk)("MMM-Tibber documentation"),ne=(0,a.Uk)("."),se={},ae=(0,s(3744).Z)(se,[["render",function(e,n){const s=(0,a.up)("RouterLink"),t=(0,a.up)("OutboundLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[o,r,l,i,u,p,c,_,h,k,d,b,m,g,f,U,y,(0,a._)("p",null,[v,(0,a.Wm)(s,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[w])),_:1})]),M,x,T,q,I,S,O,W,A,C,j,D,N,H,R,Y,(0,a._)("p",null,[P,(0,a._)("a",V,[B,(0,a.Wm)(t)]),L,(0,a._)("a",Z,[E,(0,a.Wm)(t)]),F,(0,a._)("a",z,[G,(0,a.Wm)(t)]),J]),K,Q,(0,a._)("p",null,[X,(0,a._)("a",$,[ee,(0,a.Wm)(t)]),ne])],64)}]])},3744:(e,n)=>{n.Z=(e,n)=>{const s=e.__vccOpts||e;for(const[e,a]of n)s[e]=a;return s}},7188:(e,n,s)=>{e.exports=s.p+"assets/img/node-ps-strategy-best-save.392292d5.png"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[22],{2336:(e,r,t)=>{t.r(r),t.d(r,{data:()=>o});const o={key:"v-1ad821fa",path:"/nodes/power-saver.html",title:"power-saver",lang:"en-US",frontmatter:{next:"./ps-strategy-best-save.md"},excerpt:"",headers:[],filePathRelative:"nodes/power-saver.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},8718:(e,r,t)=>{t.r(r),t.d(r,{default:()=>k});var o=t(6252),a=t(7656),s=t(2913),n=t(1758);const i={id:"power-saver",tabindex:"-1"},d=(0,o._)("a",{class:"header-anchor",href:"#power-saver","aria-hidden":"true"},"#",-1),l=(0,o.Uk)(" power-saver "),p=(0,o._)("p",null,[(0,o._)("img",{src:a,alt:"Power Saver node"})],-1),c=(0,o._)("p",null,"This is the node from version 2. It is still working, but should be replaced.",-1),u=(0,o._)("p",null,"To migrate, just replace the Power Saver node by a combination of the ps-receive-price and the ps-best-save nodes:",-1),v=(0,o._)("p",null,[(0,o.Uk)("Replace the "),(0,o._)("code",null,"Power Saver"),(0,o.Uk)(" node from version 2:")],-1),h=(0,o._)("p",null,[(0,o._)("img",{src:s,alt:"Power Saver node"})],-1),m=(0,o._)("p",null,[(0,o.Uk)("with this combination of "),(0,o._)("code",null,"ps-receive-price"),(0,o.Uk)(" and "),(0,o._)("code",null,"ps-strategy-best-save"),(0,o.Uk)(" from version 3:")],-1),_=(0,o._)("p",null,[(0,o._)("img",{src:n,alt:"Migrate Power Saver"})],-1),f=(0,o._)("p",null,[(0,o.Uk)("The configuration is done in the "),(0,o._)("code",null,"ps-strategy-best-save"),(0,o.Uk)(" node, and is the same as in the old "),(0,o._)("code",null,"Power Saver"),(0,o.Uk)(" node.")],-1),g=(0,o._)("p",null,[(0,o.Uk)("Should you need it, here is the "),(0,o._)("a",{href:"./old-power-saver-doc"},"old documentation"),(0,o.Uk)(" for the PowerSaver node from version 2.")],-1),w={},k=(0,t(3744).Z)(w,[["render",function(e,r){const t=(0,o.up)("Badge");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o._)("h1",i,[d,l,(0,o.Wm)(t,{type:"warning",text:"deprecated",vertical:"middle"})]),p,c,u,v,h,m,_,f,g],64)}]])},3744:(e,r)=>{r.Z=(e,r)=>{const t=e.__vccOpts||e;for(const[e,o]of r)t[e]=o;return t}},1758:(e,r,t)=>{e.exports=t.p+"assets/img/migrate-best-save.f73420f6.png"},2913:(e,r,t)=>{e.exports=t.p+"assets/img/migrate-power-saver.aae13f9d.png"},7656:(e,r,t)=>{e.exports=t.p+"assets/img/node-power-saver.51ff2e5d.png"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[901],{8835:(s,n,a)=>{a.r(n),a.d(n,{data:()=>t});const t={key:"v-30acb564",path:"/examples/example-nordpool-events-state.html",title:"Nord Pool and events: state node",lang:"en-US",frontmatter:{},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Flow",slug:"flow",children:[]}],filePathRelative:"examples/example-nordpool-events-state.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},2870:(s,n,a)=>{a.r(n),a.d(n,{default:()=>u});var t=a(6252),o=a(2201);const e=(0,t._)("h1",{id:"nord-pool-and-events-state-node",tabindex:"-1"},[(0,t._)("a",{class:"header-anchor",href:"#nord-pool-and-events-state-node","aria-hidden":"true"},"#"),(0,t.Uk)(" Nord Pool and events: state node")],-1),p=(0,t._)("h2",{id:"description",tabindex:"-1"},[(0,t._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,t.Uk)(" Description")],-1),k=(0,t._)("p",null,[(0,t.Uk)("In this example, data is read from the Nord Pool sensor in HA via the "),(0,t._)("code",null,"events: state"),(0,t.Uk)(" node. The "),(0,t._)("code",null,"ps-lowest-price"),(0,t.Uk)(" node is used to control a switch, controlled by "),(0,t._)("code",null,"call service"),(0,t.Uk)(" nodes in Home Assistant, to turn on the cheapest 4 hours between 18:00 and 08:00. The schedule is printed to a debug node. The flow is triggered every time the Nord Pool sensor receives new prices.")],-1),c=(0,t._)("p",null,[(0,t._)("img",{src:o,alt:"Example with Tibber and MQTT"})],-1),r=(0,t._)("h2",{id:"flow",tabindex:"-1"},[(0,t._)("a",{class:"header-anchor",href:"#flow","aria-hidden":"true"},"#"),(0,t.Uk)(" Flow")],-1),l=(0,t._)("div",{class:"language-json ext-json"},[(0,t._)("pre",{class:"language-json"},[(0,t._)("code",null,[(0,t._)("span",{class:"token punctuation"},"["),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"3662aca5.dfe974"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"server-state-changed"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Nord Pool sensor"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"server"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ec4a12a1.b2be9"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"version"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"3"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"exposeToHomeAssistant"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"haConfig"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"property"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"name"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"value"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"property"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"icon"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"value"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"entityidfilter"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"sensor.nordpool_kwh_trheim_nok_3_095_025"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"entityidfiltertype"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"exact"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputinitially"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"state_type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"str"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"haltifstate"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"halt_if_type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"str"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"halt_if_compare"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"is"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputs"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"1"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"output_only_on_state_change"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"for"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"0"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"forType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"num"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"forUnits"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"minutes"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ignorePrevStateNull"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ignorePrevStateUnknown"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ignorePrevStateUnavailable"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ignoreCurrentStateUnknown"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ignoreCurrentStateUnavailable"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputProperties"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"property"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"payload"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"propertyType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"msg"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"value"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"valueType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"entityState"'),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"property"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"data"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"propertyType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"msg"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"value"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"valueType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"eventData"'),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"property"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"topic"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"propertyType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"msg"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"value"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"valueType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"triggerId"'),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"120"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"620"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token string"},'"e21a4b49adea2350"'),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ed7202ff.b5725"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"debug"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Nord Pool result"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"active"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"tosidebar"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"console"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"tostatus"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"complete"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"true"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"targetType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"full"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"statusVal"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"statusType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"auto"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"720"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"680"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"32f17ab2.927cf6"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"api-call-service"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Turn on"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"server"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ec4a12a1.b2be9"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"version"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"3"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"debugenabled"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"service_domain"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"switch"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"service"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"turn_on"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"entityId"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"switch.varmtvannsbereder_switch"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"data"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"dataType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"jsonata"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"mergecontext"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"mustacheAltTags"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputProperties"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"queue"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"none"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"700"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"580"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"2a3cd7db.0891f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"api-call-service"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Turn off"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"server"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ec4a12a1.b2be9"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"version"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"3"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"debugenabled"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"service_domain"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"switch"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"service"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"turn_off"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"entityId"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"switch.varmtvannsbereder_switch"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"data"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"dataType"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"json"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"mergecontext"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'""'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"mustacheAltTags"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputProperties"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"queue"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"none"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"700"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"620"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"e21a4b49adea2350"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ps-receive-price"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Price Receiver"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"310"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"620"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token string"},'"391ac08890e0dd40"'),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"391ac08890e0dd40"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ps-strategy-lowest-price"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"z"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"d938c47f.3398f8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Lowest Price"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"fromTime"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"18"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"toTime"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"08"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"hoursOn"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"04"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"doNotSplit"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"false"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"false"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"x"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"490"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"y"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"620"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"wires"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token string"},'"32f17ab2.927cf6"'),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token string"},'"2a3cd7db.0891f8"'),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"["),(0,t._)("span",{class:"token string"},'"ed7202ff.b5725"'),(0,t._)("span",{class:"token punctuation"},"]"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"id"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"ec4a12a1.b2be9"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"type"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"server"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"name"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"Home Assistant"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"version"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"2"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"addon"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"rejectUnauthorizedCerts"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"ha_boolean"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token string"},'"y|yes|true|on|home|open"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"connectionDelay"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"cacheJson"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"true"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"heartbeat"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token boolean"},"false"),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)("\n "),(0,t._)("span",{class:"token property"},'"heartbeatInterval"'),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"30"),(0,t.Uk)("\n "),(0,t._)("span",{class:"token punctuation"},"}"),(0,t.Uk)("\n"),(0,t._)("span",{class:"token punctuation"},"]"),(0,t.Uk)("\n")])])],-1),_={},u=(0,a(3744).Z)(_,[["render",function(s,n){return(0,t.wg)(),(0,t.iD)(t.HY,null,[e,p,k,c,r,l],64)}]])},3744:(s,n)=>{n.Z=(s,n)=>{const a=s.__vccOpts||s;for(const[s,t]of n)a[s]=t;return a}},2201:(s,n,a)=>{s.exports=a.p+"assets/img/power-saver-nordpool-events-state.8c392507.png"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[418],{3959:(n,e,s)=>{s.r(e),s.d(e,{data:()=>a});const a={key:"v-4637f9e4",path:"/nodes/ps-strategy-lowest-price.html",title:"ps-strategy-lowest-price",lang:"en-US",frontmatter:{next:"./ps-receive-price.md"},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Configuration",slug:"configuration",children:[{level:3,title:"Dynamic config",slug:"dynamic-config",children:[]}]},{level:2,title:"Input",slug:"input",children:[]},{level:2,title:"Output",slug:"output",children:[]},{level:2,title:"Tips & tricks",slug:"tips-tricks",children:[{level:3,title:"Multiple nodes works together",slug:"multiple-nodes-works-together",children:[]},{level:3,title:"Highest price",slug:"highest-price",children:[]}]}],filePathRelative:"nodes/ps-strategy-lowest-price.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},1255:(n,e,s)=>{s.r(e),s.d(e,{default:()=>E});var a=s(6252),t=s(6110);const o=(0,a._)("h1",{id:"ps-strategy-lowest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#ps-strategy-lowest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" ps-strategy-lowest-price")],-1),l=(0,a._)("p",null,[(0,a._)("img",{src:t,alt:"ps-strategy-lowest-price"})],-1),r=(0,a._)("p",null,"Strategy node to turn on power the hours when the price is lowest during a given period, and turn off the other hours.",-1),p=(0,a._)("h2",{id:"description",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,a.Uk)(" Description")],-1),c=(0,a._)("p",null,"The node can work on a specific period from 1 to 24 hours during a 24 hour period. Inside this period, you can decide how many hours that shall be on. The rest of the period will be off. Outside the peiod, you can select that the output shall be either on or off. You can also decide that the hours on shall be consequtive (one continuous period) or spread around in multiple on-periods.",-1),i=(0,a._)("h2",{id:"configuration",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#configuration","aria-hidden":"true"},"#"),(0,a.Uk)(" Configuration")],-1),u=(0,a._)("p",null,[(0,a._)("img",{src:"/lowest-price-config.png",alt:"Node Configuration"})],-1),_=(0,a._)("table",null,[(0,a._)("thead",null,[(0,a._)("tr",null,[(0,a._)("th",null,"Value"),(0,a._)("th",null,"Description")])]),(0,a._)("tbody",null,[(0,a._)("tr",null,[(0,a._)("td",null,"From Time"),(0,a._)("td",null,"The start time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"To Time"),(0,a._)("td",null,"The end time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Hours On"),(0,a._)("td",null,"The number of hours that shall be turned on.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Consecutive On-Period"),(0,a._)("td",null,"Check this if you need the on-period to be consecutive.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Send When Rescheduling"),(0,a._)("td",null,"Check this to make sure on or off output is sent immediately after rescheduling.")]),(0,a._)("tr",null,[(0,a._)("td",null,"If No Schedule, Send"),(0,a._)("td",null,"What to do if there is no valid schedule any more (turn on or off).")]),(0,a._)("tr",null,[(0,a._)("td",null,"Outside Period, Send"),(0,a._)("td",null,"Select the value to send outside the selected period.")])])],-1),k=(0,a._)("p",null,"If you want to use a period of 24 hours, set the From Time and To Time to the same value. The time you select is signficant in the way that it decides which 24 hours that are considered when finding the hours with lowest price.",-1),d=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with Consecutive On-Period"),(0,a._)("p",null,[(0,a.Uk)("One example to need a consecutive on-period can be if you want to control the washing machine. Let's say it needs 3 hours, and you want it to run between 22:00 and 06:00. Set "),(0,a._)("code",null,"From Time = 22:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 06:00"),(0,a.Uk)(" and check the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the cheapest 3-hour period from 22:00 to 06:00.")]),(0,a._)("p",null,"NB! It is not recommended to run the washing machine when you are sleeping or away.")],-1),h=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with non-consecutive on-period"),(0,a._)("p",null,[(0,a.Uk)("If you have heating cables in the driveway, you may need them to be on only for a few hours every day, for example 4 hours, but it may not be important when this is. Then set "),(0,a._)("code",null,"From Time = 00:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 00:00"),(0,a.Uk)(" and "),(0,a._)("strong",null,"un-check"),(0,a.Uk)(" the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the 4 cheapest hours during the whole day, and off the rest.")]),(0,a._)("p",null,[(0,a.Uk)("You can use any time for start and end, but it is a good idea to use "),(0,a._)("code",null,"00:00"),(0,a.Uk)(", since the prices normally comes for this period.")])],-1),b=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"Outside Period, Send"),(0,a._)("p",null,[(0,a.Uk)("Unless the period you select is 24 hours ("),(0,a._)("code",null,"From Time"),(0,a.Uk)(" and "),(0,a._)("code",null,"To Time"),(0,a.Uk)(" are the same), it is important what value you choose for "),(0,a._)("code",null,"Outside Period, Send"),(0,a.Uk)(". This decides whether the output is on or off during the period that is outside the selected period.")])],-1),m=(0,a._)("div",{class:"custom-container danger"},[(0,a._)("p",{class:"custom-container-title"},"Schedule not calculated"),(0,a._)("p",null,"If you select a period for example from 10:00 to 02:00, it may not be possible to calculate before the period starts. This is because electricity prices for the next day (in the Nord Pool area) normally are received around 13:00. The node cannot calculate the period until it has price data for the whole period.")],-1),U=(0,a._)("h3",{id:"dynamic-config",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-config","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic config")],-1),g=(0,a._)("p",null,"It is possible to change config dynamically by sending a config message to the node. The config messages has a payload with a config object like this example:",-1),f=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"10"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"16"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"3"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br")])],-1),y=(0,a._)("p",null,"All the variables in the config object are optional. You can send only those you want to change.",-1),w=(0,a._)("p",null,"The config sent like this will be valid until a new config is sent the same way, or until the flow is restarted. On a restart, the original config set up in the node will be used.",-1),v=(0,a._)("p",null,"When a config is sent like this, the schedule will be replanned based on the last previously received price data. If no price data has been received, no scheduling is done.",-1),T=(0,a._)("h2",{id:"input",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#input","aria-hidden":"true"},"#"),(0,a.Uk)(" Input")],-1),x=(0,a.Uk)("The input is the "),O=(0,a.Uk)("common strategy input format"),C=(0,a._)("h2",{id:"output",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output","aria-hidden":"true"},"#"),(0,a.Uk)(" Output")],-1),S=(0,a._)("p",null,"When a valid input is received, and the schedule is recalculated, the resulting schedule, as well as some other information, is sent to output 3. You can use this to see the plan and verify that it meets your expectations. You can also use it to display the schedule in any way you like.",-1),I=(0,a._)("p",null,"Example of output:",-1),P=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"schedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hours"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4778"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4828"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T01:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token comment"},"//..."),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.6514"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T23:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"source"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"Tibber"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"04"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"18"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"06"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"12"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"13"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"14"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"15"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"16"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"17"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"18"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"19"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"20"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"21"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"22"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"23"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"24"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"25"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"26"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"27"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"28"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"29"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"30"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"31"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"32"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"33"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"34"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"35"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"36"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"37"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"38"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"39"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"40"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"41"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"42"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"43"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"44"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"45"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"46"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"47"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"48"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"49"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"50"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"51"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"52"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"53"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"54"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"55"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"56"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"57"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"58"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"59"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"60"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"61"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"62"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"63"),(0,a._)("br")])],-1),j=(0,a._)("p",null,[(0,a.Uk)("The "),(0,a._)("code",null,"schedule"),(0,a.Uk)(" array shows every time the switch is turned on or off. The "),(0,a._)("code",null,"hours"),(0,a.Uk)(" array shows values per hour containing the price (received as input), whether that hour is on or off, the start time of the hour and the amount per kWh that is saved on hours that are turned off, compared to the next hour that is on.")],-1),N=(0,a._)("h2",{id:"tips-tricks",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#tips-tricks","aria-hidden":"true"},"#"),(0,a.Uk)(" Tips & tricks")],-1),W=(0,a._)("h3",{id:"multiple-nodes-works-together",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#multiple-nodes-works-together","aria-hidden":"true"},"#"),(0,a.Uk)(" Multiple nodes works together")],-1),Y=(0,a._)("p",null,"You can use multiple nodes simultanously, for different periods, if you want more hours on one part of the day than another part, or to make sure there are at least some hours on during each period.",-1),D=(0,a._)("h3",{id:"highest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#highest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" Highest price")],-1),F=(0,a._)("p",null,[(0,a.Uk)("If you want to find the "),(0,a._)("code",null,"x"),(0,a.Uk)(" hours with the highest prices, do as follows:")],-1),H=(0,a._)("ol",null,[(0,a._)("li",null,[(0,a.Uk)("Calculate "),(0,a._)("code",null,"y"),(0,a.Uk)(" as the total number of hours in the period. For example, if the period is from "),(0,a._)("code",null,"08:00"),(0,a.Uk)(" to "),(0,a._)("code",null,"20:00"),(0,a.Uk)(", then "),(0,a._)("code",null,"y = 12"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Configure "),(0,a._)("code",null,"Hours On = y - x"),(0,a.Uk)(", so if "),(0,a._)("code",null,"x = 4"),(0,a.Uk)(", then "),(0,a._)("code",null,"Hours On = 12 - 4 = 8"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Use "),(0,a._)("strong",null,"Output 2"),(0,a.Uk)(" to get a signal when you have the hours with the highest prices. Just remember that the value sent to output 2 is "),(0,a._)("code",null,"false"),(0,a.Uk)(", not "),(0,a._)("code",null,"true"),(0,a.Uk)(" as it is on output 1.")])],-1),R={},E=(0,s(3744).Z)(R,[["render",function(n,e){const s=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[o,l,r,p,c,i,u,_,k,d,h,b,m,U,g,f,y,w,v,T,(0,a._)("p",null,[x,(0,a.Wm)(s,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[O])),_:1})]),C,S,I,P,j,N,W,Y,D,F,H],64)}]])},3744:(n,e)=>{e.Z=(n,e)=>{const s=n.__vccOpts||n;for(const[n,a]of e)s[n]=a;return s}},6110:(n,e,s)=>{n.exports=s.p+"assets/img/node-ps-strategy-lowest-price.3a4ad347.png"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[495],{3707:(e,i,l)=>{l.r(i),l.d(i,{data:()=>a});const a={key:"v-510ed0d4",path:"/changelog/",title:"Change Log",lang:"en-US",frontmatter:{sidebar:"auto"},excerpt:"",headers:[{level:2,title:"3.0.3",slug:"_3-0-3",children:[]},{level:2,title:"3.0.2",slug:"_3-0-2",children:[]},{level:2,title:"3.0.1",slug:"_3-0-1",children:[]},{level:2,title:"3.0.0",slug:"_3-0-0",children:[]},{level:2,title:"2.1.0",slug:"_2-1-0",children:[]},{level:2,title:"2.0.5",slug:"_2-0-5",children:[]},{level:2,title:"2.0.4",slug:"_2-0-4",children:[]},{level:2,title:"2.0.3",slug:"_2-0-3",children:[]},{level:2,title:"2.0.2",slug:"_2-0-2",children:[]},{level:2,title:"2.0.1",slug:"_2-0-1",children:[]},{level:2,title:"2.0.0",slug:"_2-0-0",children:[]},{level:2,title:"1.0.9",slug:"_1-0-9",children:[]}],filePathRelative:"changelog/README.md",git:{updatedTime:16394709e5,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:3},{name:"Otto Paulsen",email:"otto.paulsen@itema.no",commits:1}]}}},7478:(e,i,l)=>{l.r(i),l.d(i,{default:()=>d});const a=(0,l(6252).uE)('<h1 id="change-log" tabindex="-1"><a class="header-anchor" href="#change-log" aria-hidden="true">#</a> Change Log</h1><p>List the most significant changes, starting in version 1.0.9.</p><h2 id="_3-0-3" tabindex="-1"><a class="header-anchor" href="#_3-0-3" aria-hidden="true">#</a> 3.0.3</h2><ul><li>Fix bug in lowest price strategy, when period ends at midnight.</li><li>Fix labels for hours on, so they do not have leading zero.</li><li>Fix so source should be visible in output 3.</li></ul><h2 id="_3-0-2" tabindex="-1"><a class="header-anchor" href="#_3-0-2" aria-hidden="true">#</a> 3.0.2</h2><ul><li>Bugfix in Lowest Price node (not successful)</li></ul><h2 id="_3-0-1" tabindex="-1"><a class="header-anchor" href="#_3-0-1" aria-hidden="true">#</a> 3.0.1</h2><ul><li>Fix so elvia subscripion key is stored as credential</li><li>Fix bug on config for strategy nodes. Config was not saved properly.</li><li>Remove double output bug, and better handling when hoursOn &gt; period</li></ul><h2 id="_3-0-0" tabindex="-1"><a class="header-anchor" href="#_3-0-0" aria-hidden="true">#</a> 3.0.0</h2><ul><li>Deprecating old Power Saver node, adding multiple new nodes.</li><li>New node <code>ps-strategy-best-save</code> is replacing old node <code>Power Saver</code> together with the new <code>ps-receive-price</code> node.</li><li>Add new strategy node: <code>ps-strategy-lowest-price</code>.</li><li>Add new node: <code>ps-receive-price</code>.</li><li>Add gridd tariff for Elvia customers, using the <code>ps-elvia-add-tariff</code> node.</li><li>New documentation.</li><li>Change node category to Power Saver.</li></ul><h2 id="_2-1-0" tabindex="-1"><a class="header-anchor" href="#_2-1-0" aria-hidden="true">#</a> 2.1.0</h2><ul><li>Accept config as input, making it possible to dynamically change config</li><li>Fix dropdown for config value for selecting output when there is no schedule</li><li>Improve config screen and documentation</li></ul><h2 id="_2-0-5" tabindex="-1"><a class="header-anchor" href="#_2-0-5" aria-hidden="true">#</a> 2.0.5</h2><ul><li>Update links to examples</li></ul><h2 id="_2-0-4" tabindex="-1"><a class="header-anchor" href="#_2-0-4" aria-hidden="true">#</a> 2.0.4</h2><ul><li>Update doc and add examples</li></ul><h2 id="_2-0-3" tabindex="-1"><a class="header-anchor" href="#_2-0-3" aria-hidden="true">#</a> 2.0.3</h2><ul><li>Bugfix</li></ul><h2 id="_2-0-2" tabindex="-1"><a class="header-anchor" href="#_2-0-2" aria-hidden="true">#</a> 2.0.2</h2><ul><li>Fix so Nordpool data can be read directly from the current state node</li></ul><h2 id="_2-0-1" tabindex="-1"><a class="header-anchor" href="#_2-0-1" aria-hidden="true">#</a> 2.0.1</h2><ul><li>Fix bug that caused no schedule</li><li>Add config to output</li></ul><h2 id="_2-0-0" tabindex="-1"><a class="header-anchor" href="#_2-0-0" aria-hidden="true">#</a> 2.0.0</h2><ul><li>New and better algorithm to calculate savings, resulting in a better schedule.</li><li>Removed possibility to configure maximum hours to save per day, as this does not really make much sense.</li><li>Round savings to 4 decimals.</li><li>Set last savings hour to null when 0.</li></ul><h2 id="_1-0-9" tabindex="-1"><a class="header-anchor" href="#_1-0-9" aria-hidden="true">#</a> 1.0.9</h2><ul><li>Fix bug in saving last hour of the day.</li></ul>',26),t={},d=(0,l(3744).Z)(t,[["render",function(e,i){return a}]])},3744:(e,i)=>{i.Z=(e,i)=>{const l=e.__vccOpts||e;for(const[e,a]of i)l[e]=a;return l}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[317],{1535:(n,s,a)=>{a.r(s),a.d(s,{data:()=>t});const t={key:"v-5954bcb2",path:"/nodes/strategy-input.html",title:"Strategy input format",lang:"en-US",frontmatter:{},excerpt:"",headers:[],filePathRelative:"nodes/strategy-input.md",git:{updatedTime:1639315027e3,contributors:[{name:"Otto Paulsen",email:"ottpau@gmail.com",commits:1}]}}},8638:(n,s,a)=>{a.r(s),a.d(s,{default:()=>e});const t=(0,a(6252).uE)('<h1 id="strategy-input-format" tabindex="-1"><a class="header-anchor" href="#strategy-input-format" aria-hidden="true">#</a> Strategy input format</h1><p>The common input for strategy nodes is a payload with a <code>priceData</code> array containing an object for each hour. Each object has a <code>value</code> wich is the price, and a <code>start</code> wich is the start time for the hour.</p><p>Example:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>\n <span class="token property">&quot;priceData&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n <span class="token punctuation">{</span>\n <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token number">0.9544</span><span class="token punctuation">,</span>\n <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2021-12-07T00:00:00.000+01:00&quot;</span>\n <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span>\n <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token number">0.8973</span><span class="token punctuation">,</span>\n <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2021-12-07T01:00:00.000+01:00&quot;</span>\n <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span>\n <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token number">0.8668</span><span class="token punctuation">,</span>\n <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2021-12-07T02:00:00.000+01:00&quot;</span>\n <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span>\n <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token number">0.8683</span><span class="token punctuation">,</span>\n <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2021-12-07T03:00:00.000+01:00&quot;</span>\n <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span>\n <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token number">0.8942</span><span class="token punctuation">,</span>\n <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2021-12-07T04:00:00.000+01:00&quot;</span>\n <span class="token punctuation">}</span>\n <span class="token comment">// ... normally 24 or 48 hours</span>\n <span class="token punctuation">]</span>\n<span class="token punctuation">}</span>\n</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br></div></div><p>This format is used for:</p><ul><li>Output of the <code>ps-receive-price</code> node</li><li>Input and output of the <code>ps-xxx-add-tariff</code> nodes</li><li>Input for the strategy nodes (<code>ps-strategy-xxx-xxx</code>)</li></ul>',6),p={},e=(0,a(3744).Z)(p,[["render",function(n,s){return t}]])},3744:(n,s)=>{s.Z=(n,s)=>{const a=n.__vccOpts||n;for(const[n,t]of s)a[n]=t;return a}}}]);