node-red-contrib-power-saver 3.2.2 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -1
  3. package/docs/.vuepress/clientAppEnhance.js +5 -0
  4. package/docs/.vuepress/components/BestSaveVerificator.vue +306 -0
  5. package/docs/.vuepress/components/DonateButtons.vue +87 -0
  6. package/docs/.vuepress/config.js +29 -5
  7. package/docs/.vuepress/dist/.nojekyll +0 -0
  8. package/docs/.vuepress/dist/404.html +5 -5
  9. package/docs/.vuepress/dist/assets/css/563.styles.99f4a8aa.css +1 -0
  10. package/docs/.vuepress/dist/assets/css/835.styles.c5afb22b.css +1 -0
  11. package/docs/.vuepress/dist/assets/css/{styles.e835bef6.css → styles.031dcf27.css} +2 -1
  12. package/docs/.vuepress/dist/assets/img/best-save-config.79a2f39a.png +0 -0
  13. package/docs/.vuepress/dist/assets/img/copy-payload-best-save.b9192985.png +0 -0
  14. package/docs/.vuepress/dist/assets/js/262.cf2c57d2.js +1 -0
  15. package/docs/.vuepress/dist/assets/js/{293.5e967839.js → 293.08ea5200.js} +0 -0
  16. package/docs/.vuepress/dist/assets/js/331.15ee3c51.js +1 -0
  17. package/docs/.vuepress/dist/assets/js/{491.c183eba3.js → 491.17a98f38.js} +0 -0
  18. package/docs/.vuepress/dist/assets/js/619.8ba1b1f6.js +2 -0
  19. package/docs/.vuepress/dist/assets/js/{812.79dad458.js.LICENSE.txt → 619.8ba1b1f6.js.LICENSE.txt} +0 -0
  20. package/docs/.vuepress/dist/assets/js/811.6a3392d5.js +1 -0
  21. package/docs/.vuepress/dist/assets/js/app.b705176c.js +1 -0
  22. package/docs/.vuepress/dist/assets/js/runtime~app.47f4f812.js +1 -0
  23. package/docs/.vuepress/dist/assets/js/{v-0607240a.661e1808.js → v-0607240a.a57c2199.js} +0 -0
  24. package/docs/.vuepress/dist/assets/js/{v-08683c60.a6b9cf5b.js → v-08683c60.ccafdcab.js} +0 -0
  25. package/docs/.vuepress/dist/assets/js/{v-0aca7ba6.b42fad7f.js → v-0aca7ba6.25903946.js} +0 -0
  26. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.a6a015b4.js +1 -0
  27. package/docs/.vuepress/dist/assets/js/{v-1ad821fa.6e2194d0.js → v-1ad821fa.5978386f.js} +0 -0
  28. package/docs/.vuepress/dist/assets/js/{v-1e2b191e.98cc227b.js → v-1e2b191e.88dc5555.js} +0 -0
  29. package/docs/.vuepress/dist/assets/js/v-29504124.4aca27d5.js +1 -0
  30. package/docs/.vuepress/dist/assets/js/{v-30acb564.f2fcd69f.js → v-30acb564.529a3c16.js} +0 -0
  31. package/docs/.vuepress/dist/assets/js/v-4637f9e4.703b1d96.js +1 -0
  32. package/docs/.vuepress/dist/assets/js/v-510ed0d4.7b142a81.js +1 -0
  33. package/docs/.vuepress/dist/assets/js/{v-5954bcb2.182daf70.js → v-5954bcb2.937005d0.js} +0 -0
  34. package/docs/.vuepress/dist/assets/js/{v-5db8da3a.f2de6cb9.js → v-5db8da3a.3de3588d.js} +1 -1
  35. package/docs/.vuepress/dist/assets/js/{v-61f728ca.6fdbbb92.js → v-61f728ca.21d432fe.js} +1 -1
  36. package/docs/.vuepress/dist/assets/js/{v-677dfaed.0013f083.js → v-677dfaed.44a653b9.js} +0 -0
  37. package/docs/.vuepress/dist/assets/js/v-7446a652.74b21d0b.js +1 -0
  38. package/docs/.vuepress/dist/assets/js/v-7c87f26e.ee5be992.js +1 -0
  39. package/docs/.vuepress/dist/assets/js/{v-8daa1a0e.dde202c9.js → v-8daa1a0e.c63afc2b.js} +1 -1
  40. package/docs/.vuepress/dist/assets/js/{v-b4a42144.9e5f9728.js → v-b4a42144.733e4e7c.js} +0 -0
  41. package/docs/.vuepress/dist/assets/js/{v-e8c55052.8384b053.js → v-e8c55052.ab0a79ec.js} +0 -0
  42. package/docs/.vuepress/dist/assets/js/v-fffb8e28.525be02a.js +1 -0
  43. package/docs/.vuepress/dist/changelog/index.html +5 -5
  44. package/docs/.vuepress/dist/contribute/index.html +5 -5
  45. package/docs/.vuepress/dist/examples/example-next-schedule-entity.html +6 -6
  46. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +6 -7
  47. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +6 -6
  48. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +6 -7
  49. package/docs/.vuepress/dist/examples/index.html +5 -5
  50. package/docs/.vuepress/dist/faq/best-save-viewer.html +15 -0
  51. package/docs/.vuepress/dist/faq/index.html +5 -5
  52. package/docs/.vuepress/dist/guide/index.html +6 -6
  53. package/docs/.vuepress/dist/index.html +5 -5
  54. package/docs/.vuepress/dist/nodes/index.html +5 -5
  55. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +7 -7
  56. package/docs/.vuepress/dist/nodes/power-saver.html +5 -5
  57. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +5 -5
  58. package/docs/.vuepress/dist/nodes/ps-general-add-tariff.html +5 -5
  59. package/docs/.vuepress/dist/nodes/ps-receive-price.html +8 -8
  60. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +22 -8
  61. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +17 -7
  62. package/docs/.vuepress/dist/nodes/strategy-input.html +5 -5
  63. package/docs/README.md +4 -1
  64. package/docs/changelog/README.md +23 -0
  65. package/docs/contribute/README.md +3 -3
  66. package/docs/examples/example-nordpool-current-state.md +0 -1
  67. package/docs/examples/example-tibber-mqtt.md +0 -1
  68. package/docs/faq/README.md +28 -1
  69. package/docs/faq/best-save-viewer.md +61 -0
  70. package/docs/images/best-save-config.png +0 -0
  71. package/docs/images/copy-payload-best-save.png +0 -0
  72. package/docs/nodes/ps-strategy-best-save.md +95 -8
  73. package/docs/nodes/ps-strategy-lowest-price.md +57 -0
  74. package/package.json +7 -3
  75. package/src/general-add-tariff-functions.js +0 -1
  76. package/src/general-add-tariff.js +2 -4
  77. package/src/handle-input.js +31 -9
  78. package/src/strategy-best-save.html +0 -21
  79. package/src/strategy-best-save.js +8 -11
  80. package/test/commands-input.test.js +47 -0
  81. package/test/data/best-save-result.json +1 -2
  82. package/test/data/current-undefined-prices.json +197 -0
  83. package/test/data/current-undefined-result.json +208 -0
  84. package/test/data/lowest-price-result-missing-end.json +2 -1
  85. package/test/data/reconfigResult.js +56 -294
  86. package/test/data/reconfigResult_old2.js +75 -0
  87. package/test/data/tibber-result-end-0-24h.json +1 -0
  88. package/test/data/tibber-result-end-0.json +1 -0
  89. package/test/send-config-input.test.js +3 -37
  90. package/test/strategy-best-save-test-utils.js +2 -1
  91. package/test/strategy-best-save.test.js +14 -8
  92. package/test/test-utils.js +1 -7
  93. package/test/utils.test.js +0 -33
  94. package/docs/.vuepress/dist/assets/img/best-save-config.93fa3c21.png +0 -0
  95. package/docs/.vuepress/dist/assets/js/812.79dad458.js +0 -2
  96. package/docs/.vuepress/dist/assets/js/app.46f7644a.js +0 -1
  97. package/docs/.vuepress/dist/assets/js/runtime~app.714a526c.js +0 -1
  98. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.3b37457f.js +0 -1
  99. package/docs/.vuepress/dist/assets/js/v-4637f9e4.b320f5e8.js +0 -1
  100. package/docs/.vuepress/dist/assets/js/v-510ed0d4.9d35e3e3.js +0 -1
  101. package/docs/.vuepress/dist/assets/js/v-7446a652.d05e2648.js +0 -1
  102. package/docs/.vuepress/dist/assets/js/v-7c87f26e.1127dcf5.js +0 -1
  103. package/docs/.vuepress/dist/assets/js/v-fffb8e28.3406fd88.js +0 -1
  104. package/test/data/adjustedResult.js +0 -302
  105. package/test/data/adjustedResult_old.js +0 -154
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8">
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
- <link rel="icon" href="/euro.png"><title>Contribute | 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.714a526c.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.46f7644a.js" as="script">
9
- <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
7
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9857859182772006" crossorigin="anonymous"></script><title>Contribute | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
+ <link rel="preload" href="/assets/js/runtime~app.47f4f812.js" as="script"><link rel="preload" href="/assets/css/styles.031dcf27.css" as="style"><link rel="preload" href="/assets/js/619.8ba1b1f6.js" as="script"><link rel="preload" href="/assets/js/app.b705176c.js" as="script">
9
+ <link rel="stylesheet" href="/assets/css/styles.031dcf27.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/node-red-contrib-power-saver/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a aria-current="page" href="/node-red-contrib-power-saver/contribute/" class="router-link-active router-link-exact-active nav-link router-link-active" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a aria-current="page" href="/node-red-contrib-power-saver/contribute/" class="router-link-active router-link-exact-active nav-link router-link-active" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item">Contribute</p><ul class=""><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/contribute/#patreon" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Patreon"><!--[--><!--]--> Patreon <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/contribute/#code" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Code"><!--[--><!--]--> Code <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/contribute/#examples" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/contribute/#bug-reports" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Bug reports"><!--[--><!--]--> Bug reports <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/contribute/#ideas" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Ideas"><!--[--><!--]--> Ideas <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="contribute" tabindex="-1"><a class="header-anchor" href="#contribute" aria-hidden="true">#</a> Contribute</h1><h2 id="patreon" tabindex="-1"><a class="header-anchor" href="#patreon" aria-hidden="true">#</a> Patreon</h2><p>Developing software is time consuming. This solution has taken the better part of all my free time for about 3 quarters of a year. Getting something back would make it easier to also spend future time on this.</p><p>I am trying out Patreon to see if it is possible to get something back for the work I do. The software is open source, and you can use it for free, but if you feel it has value, you can support the development by becoming a patron, paying a monthly fee of your choice.</p><p><a href="https://www.patreon.com/bePatron?u=65948417" data-patreon-widget-type="become-patron-button">Become a Patron!</a></p><h2 id="code" tabindex="-1"><a class="header-anchor" href="#code" aria-hidden="true">#</a> Code</h2><p>It would be very nice to get more developers on board, and become a team. If you satisfy the following criteria, I would be happy to get help on developing this further:</p><ul><li>Professional or experienced developer</li><li>Know JavaScript</li><li>Write automated tests for your code</li><li>Use <code>node-red-contrib-power-saver</code></li><li>Want to collaborate on further development</li></ul><p>Please contact me, for example by making a [GitHub issue(https://github.com/ottopaulsen/node-red-contrib-power-saver/issues)] explaining what you would like to do.</p><p>The first and most important task now, is to make support for getting grid tariff from all suppliers.</p><h2 id="examples" tabindex="-1"><a class="header-anchor" href="#examples" aria-hidden="true">#</a> Examples</h2><p>It would be very nice to get more examples into the documentation. If you have made something smart, please describe in a markdown-file and either send me, or preferably make a pull request on <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/pulls" target="_blank" rel="noopener noreferrer">GitHub<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><h2 id="bug-reports" tabindex="-1"><a class="header-anchor" href="#bug-reports" aria-hidden="true">#</a> Bug reports</h2><p>If you find a bug, please describe it thoroughly and make a <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/issues" target="_blank" rel="noopener noreferrer">GitHub issue<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>. If the bug is related to the scheduling, <strong>please provide the full output from output 3</strong> on the strategy node.</p><h2 id="ideas" tabindex="-1"><a class="header-anchor" href="#ideas" aria-hidden="true">#</a> Ideas</h2><p>If you have ideas for new features, please make a <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/issues" target="_blank" rel="noopener noreferrer">GitHub issue<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a> and describe it as detailed as possible.</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/20/2021, 10:10:18 PM</span></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
13
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.714a526c.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.46f7644a.js" defer></script>
12
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a aria-current="page" href="/contribute/" class="router-link-active router-link-exact-active nav-link router-link-active" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a aria-current="page" href="/contribute/" class="router-link-active router-link-exact-active nav-link router-link-active" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item">Contribute</p><ul class=""><li><!--[--><a aria-current="page" href="/contribute/#donate" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Donate"><!--[--><!--]--> Donate <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/contribute/#code" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Code"><!--[--><!--]--> Code <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/contribute/#examples" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/contribute/#bug-reports" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Bug reports"><!--[--><!--]--> Bug reports <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/contribute/#ideas" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Ideas"><!--[--><!--]--> Ideas <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="contribute" tabindex="-1"><a class="header-anchor" href="#contribute" aria-hidden="true">#</a> Contribute</h1><h2 id="donate" tabindex="-1"><a class="header-anchor" href="#donate" aria-hidden="true">#</a> Donate</h2><p>Developing software is time consuming. This solution has taken the better part of all my free time for about 3 quarters of a year. Getting something back would make it easier to also spend future time on this.</p><p>I am trying out Patreon and PayPals &quot;Donate&quot; to see if it is possible to get something back for the work I do. The software is open source, and you can use it for free, but if you feel it has value, you can support the development by donating or becoming a patron, paying a fee of your choice.</p><!--[--><div class="box" data-v-66d8d572><div class="left" data-v-66d8d572><form action="https://www.paypal.com/donate" method="post" target="_blank" data-v-66d8d572><input type="hidden" name="business" value="5K5SRZU27TAC8" data-v-66d8d572><input type="hidden" name="no_recurring" value="0" data-v-66d8d572><input type="hidden" name="item_name" value="One of my hobbies is creating software for smart homes" data-v-66d8d572><input type="hidden" name="currency_code" value="NOK" data-v-66d8d572><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" data-v-66d8d572><img alt="" border="0" src="https://www.paypal.com/en_NO/i/scr/pixel.gif" width="1" height="1" data-v-66d8d572></form></div><div class="right" data-v-66d8d572><a class="patreonButton" href="https://www.patreon.com/bePatron?u=65948417" data-patreon-widget-type="become-patron-button" target="_blank" data-v-66d8d572>Become a Patron! </a></div></div><div data-v-66d8d572><br data-v-66d8d572></div><!--]--><h2 id="code" tabindex="-1"><a class="header-anchor" href="#code" aria-hidden="true">#</a> Code</h2><p>It would be very nice to get more developers on board, and become a team. If you satisfy the following criteria, I would be happy to get help on developing this further:</p><ul><li>Professional or experienced developer</li><li>Know JavaScript</li><li>Write automated tests for your code</li><li>Use <code>node-red-contrib-power-saver</code></li><li>Want to collaborate on further development</li></ul><p>Please contact me, for example by making a [GitHub issue(https://github.com/ottopaulsen/node-red-contrib-power-saver/issues)] explaining what you would like to do.</p><p>The first and most important task now, is to make support for getting grid tariff from all suppliers.</p><h2 id="examples" tabindex="-1"><a class="header-anchor" href="#examples" aria-hidden="true">#</a> Examples</h2><p>It would be very nice to get more examples into the documentation. If you have made something smart, please describe in a markdown-file and either send me, or preferably make a pull request on <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/pulls" target="_blank" rel="noopener noreferrer">GitHub<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><h2 id="bug-reports" tabindex="-1"><a class="header-anchor" href="#bug-reports" aria-hidden="true">#</a> Bug reports</h2><p>If you find a bug, please describe it thoroughly and make a <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/issues" target="_blank" rel="noopener noreferrer">GitHub issue<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>. If the bug is related to the scheduling, <strong>please provide the full output from output 3</strong> on the strategy node.</p><h2 id="ideas" tabindex="-1"><a class="header-anchor" href="#ideas" aria-hidden="true">#</a> Ideas</h2><p>If you have ideas for new features, please make a <a href="https://github.com/ottopaulsen/node-red-contrib-power-saver/issues" target="_blank" rel="noopener noreferrer">GitHub issue<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a> and describe it as detailed as possible.</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">1/18/2022, 8:52:35 PM</span></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
13
+ <script src="/assets/js/runtime~app.47f4f812.js" defer></script><script src="/assets/js/619.8ba1b1f6.js" defer></script><script src="/assets/js/app.b705176c.js" defer></script>
14
14
  </body>
15
15
  </html>
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8">
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
- <link rel="icon" href="/euro.png"><title>Output schedule to a sensor entity | 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.714a526c.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.46f7644a.js" as="script">
9
- <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
7
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9857859182772006" crossorigin="anonymous"></script><title>Output schedule to a sensor entity | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
+ <link rel="preload" href="/assets/js/runtime~app.47f4f812.js" as="script"><link rel="preload" href="/assets/css/styles.031dcf27.css" as="style"><link rel="preload" href="/assets/js/619.8ba1b1f6.js" as="script"><link rel="preload" href="/assets/js/app.b705176c.js" as="script">
9
+ <link rel="stylesheet" href="/assets/css/styles.031dcf27.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/node-red-contrib-power-saver/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item">Examples</p><ul class=""><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="output-schedule-to-a-sensor-entity" tabindex="-1"><a class="header-anchor" href="#output-schedule-to-a-sensor-entity" aria-hidden="true">#</a> Output schedule to a sensor entity</h1><p>This example was contributed by <a href="https://github.com/oakhill87" target="_blank" rel="noopener noreferrer">Stefan<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></p><p>Note: Requires <a href="https://github.com/zachowj/hass-node-red" target="_blank" rel="noopener noreferrer">Node-RED Companion Integration<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><p><img src="/node-red-contrib-power-saver/assets/img/next-schedule-sensor.eb896bdd.png" alt="Sensor with timestamp and attributes"> <img src="/node-red-contrib-power-saver/assets/img/next-schedule-flow.413ad62b.png" alt="Sensor flow"></p><p>This JavaScript code snippet can be pasted into a Function-node. When connected to the schedule-output (3) from Best Save, it will loop through the array of available hours and find the next timestamp where a power saving schedule is initated.</p><div class="language-javascript ext-js line-numbers-mode"><pre class="language-javascript"><code> <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>hours<span class="token punctuation">.</span>length<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
12
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item">Examples</p><ul class=""><li><!--[--><a href="/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="output-schedule-to-a-sensor-entity" tabindex="-1"><a class="header-anchor" href="#output-schedule-to-a-sensor-entity" aria-hidden="true">#</a> Output schedule to a sensor entity</h1><p>This example was contributed by <a href="https://github.com/oakhill87" target="_blank" rel="noopener noreferrer">Stefan<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></p><p>Note: Requires <a href="https://github.com/zachowj/hass-node-red" target="_blank" rel="noopener noreferrer">Node-RED Companion Integration<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><p><img src="/assets/img/next-schedule-sensor.eb896bdd.png" alt="Sensor with timestamp and attributes"> <img src="/assets/img/next-schedule-flow.413ad62b.png" alt="Sensor flow"></p><p>This JavaScript code snippet can be pasted into a Function-node. When connected to the schedule-output (3) from Best Save, it will loop through the array of available hours and find the next timestamp where a power saving schedule is initated.</p><div class="language-javascript ext-js line-numbers-mode"><pre class="language-javascript"><code> <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>hours<span class="token punctuation">.</span>length<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
13
13
  <span class="token keyword">if</span> <span class="token punctuation">(</span>msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>hours<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">.</span>onOff <span class="token operator">!=</span> <span class="token boolean">true</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
14
14
  <span class="token keyword">var</span> schedule <span class="token operator">=</span> <span class="token punctuation">{</span>time<span class="token operator">:</span> msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>hours<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">.</span>start<span class="token punctuation">,</span> topic<span class="token operator">:</span> <span class="token string">&quot;Neste spareperiode&quot;</span><span class="token punctuation">,</span> length<span class="token operator">:</span> msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>config<span class="token punctuation">.</span>maxHoursToSaveInSequence<span class="token punctuation">,</span> savings<span class="token operator">:</span> msg<span class="token punctuation">.</span>payload<span class="token punctuation">.</span>hours<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">.</span>saving<span class="token punctuation">}</span>
15
15
  <span class="token keyword">break</span><span class="token punctuation">}</span>
@@ -19,7 +19,7 @@
19
19
  <span class="token punctuation">}</span>
20
20
  <span class="token keyword">var</span> schedule_array <span class="token operator">=</span> <span class="token punctuation">{</span>upcoming<span class="token operator">:</span> schedule<span class="token punctuation">}</span>
21
21
  <span class="token keyword">return</span> <span class="token punctuation">[</span>schedule_array<span class="token punctuation">]</span>
22
- </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></div></div><p>This will return the following:</p><ul><li>msg.upcoming.time = Timestamp if saving is scheduled - False if no schedule with the current available prices.</li><li>msg.upcoming.length = How long the next saving will last - set to 0 if no schedule.</li><li>msg.upcoming.savings = Estimated savings retrieved from the node.</li></ul><h2 id="setup" tabindex="-1"><a class="header-anchor" href="#setup" aria-hidden="true">#</a> Setup</h2><ol><li>Paste the code above into a Function node and connect it to the schedule output.</li><li>Create an entity node from the Node-RED Companion Integration, and configure it according to the steps below:</li></ol><p>The msg.topic is currently not used, but in case you&#39;d want to specify dynamic names in the sensor instead of in the frontend, go ahead and add them as attributes using the following configuration:</p><ol><li><strong>State</strong>: msg.upcoming.time</li><li>Attribute key <strong>Duration</strong>: msg.upcoming.length</li><li>Attribute key <strong>Savings</strong>: msg.upcoming.savings</li></ol><img src="/node-red-contrib-power-saver/assets/img/next-schedule-entity.4406856a.png" width="25%"><h2 id="to-do" tabindex="-1"><a class="header-anchor" href="#to-do" aria-hidden="true">#</a> To-do</h2><p>If you find any bugs, let me know, but as long as the payload doesn&#39;t change it should work.</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/23/2021, 4:53:40 PM</span></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
23
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.714a526c.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.46f7644a.js" defer></script>
22
+ </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></div></div><p>This will return the following:</p><ul><li>msg.upcoming.time = Timestamp if saving is scheduled - False if no schedule with the current available prices.</li><li>msg.upcoming.length = How long the next saving will last - set to 0 if no schedule.</li><li>msg.upcoming.savings = Estimated savings retrieved from the node.</li></ul><h2 id="setup" tabindex="-1"><a class="header-anchor" href="#setup" aria-hidden="true">#</a> Setup</h2><ol><li>Paste the code above into a Function node and connect it to the schedule output.</li><li>Create an entity node from the Node-RED Companion Integration, and configure it according to the steps below:</li></ol><p>The msg.topic is currently not used, but in case you&#39;d want to specify dynamic names in the sensor instead of in the frontend, go ahead and add them as attributes using the following configuration:</p><ol><li><strong>State</strong>: msg.upcoming.time</li><li>Attribute key <strong>Duration</strong>: msg.upcoming.length</li><li>Attribute key <strong>Savings</strong>: msg.upcoming.savings</li></ol><img src="/assets/img/next-schedule-entity.4406856a.png" width="25%"><h2 id="to-do" tabindex="-1"><a class="header-anchor" href="#to-do" aria-hidden="true">#</a> To-do</h2><p>If you find any bugs, let me know, but as long as the payload doesn&#39;t change it should work.</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/23/2021, 4:53:40 PM</span></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
23
+ <script src="/assets/js/runtime~app.47f4f812.js" defer></script><script src="/assets/js/619.8ba1b1f6.js" defer></script><script src="/assets/js/app.b705176c.js" defer></script>
24
24
  </body>
25
25
  </html>
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8">
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
- <link rel="icon" href="/euro.png"><title>Nord Pool and current state node | 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.714a526c.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.46f7644a.js" as="script">
9
- <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
7
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9857859182772006" crossorigin="anonymous"></script><title>Nord Pool and current state node | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
+ <link rel="preload" href="/assets/js/runtime~app.47f4f812.js" as="script"><link rel="preload" href="/assets/css/styles.031dcf27.css" as="style"><link rel="preload" href="/assets/js/619.8ba1b1f6.js" as="script"><link rel="preload" href="/assets/js/app.b705176c.js" as="script">
9
+ <link rel="stylesheet" href="/assets/css/styles.031dcf27.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/node-red-contrib-power-saver/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="nord-pool-and-current-state-node" tabindex="-1"><a class="header-anchor" href="#nord-pool-and-current-state-node" aria-hidden="true">#</a> Nord Pool and current state node</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from the Nord Pool sensor in HA via the <code>current state</code> node. The <code>ps-best-save</code> node is used to control a water heater via a switch, controlled by <code>call service</code> nodes in Home Assistant. The schedule is printed to a debug node. An <code>inject</code> node is used to trigger the reading of the Nord Pool sensor every hour.</p><p><img src="/node-red-contrib-power-saver/assets/img/power-saver-nordpool-current-state.bf14afde.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
12
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a aria-current="page" href="/examples/example-nordpool-current-state.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/examples/example-nordpool-current-state.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/examples/example-nordpool-current-state.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li><li><!--[--><a href="/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="nord-pool-and-current-state-node" tabindex="-1"><a class="header-anchor" href="#nord-pool-and-current-state-node" aria-hidden="true">#</a> Nord Pool and current state node</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from the Nord Pool sensor in HA via the <code>current state</code> node. The <code>ps-best-save</code> node is used to control a water heater via a switch, controlled by <code>call service</code> nodes in Home Assistant. The schedule is printed to a debug node. An <code>inject</code> node is used to trigger the reading of the Nord Pool sensor every hour.</p><p><img src="/assets/img/power-saver-nordpool-current-state.bf14afde.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
13
13
  <span class="token punctuation">{</span>
14
14
  <span class="token property">&quot;id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;e2578f6a.210a8&quot;</span><span class="token punctuation">,</span>
15
15
  <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;debug&quot;</span><span class="token punctuation">,</span>
@@ -154,7 +154,6 @@
154
154
  <span class="token property">&quot;minSaving&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0.03&quot;</span><span class="token punctuation">,</span>
155
155
  <span class="token property">&quot;sendCurrentValueWhenRescheduling&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
156
156
  <span class="token property">&quot;outputIfNoSchedule&quot;</span><span class="token operator">:</span> <span class="token string">&quot;true&quot;</span><span class="token punctuation">,</span>
157
- <span class="token property">&quot;scheduleOnlyFromCurrentTime&quot;</span><span class="token operator">:</span> <span class="token string">&quot;false&quot;</span><span class="token punctuation">,</span>
158
157
  <span class="token property">&quot;x&quot;</span><span class="token operator">:</span> <span class="token number">630</span><span class="token punctuation">,</span>
159
158
  <span class="token property">&quot;y&quot;</span><span class="token operator">:</span> <span class="token number">380</span><span class="token punctuation">,</span>
160
159
  <span class="token property">&quot;wires&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
@@ -183,7 +182,7 @@
183
182
  <span class="token property">&quot;heartbeatInterval&quot;</span><span class="token operator">:</span> <span class="token number">30</span>
184
183
  <span class="token punctuation">}</span>
185
184
  <span class="token punctuation">]</span>
186
- </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/19/2021, 9:08:39 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><!----><span class="next"><a href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="nav-link" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
187
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.714a526c.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.46f7644a.js" defer></script>
185
+ </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">1/16/2022, 10:44:21 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><!----><span class="next"><a href="/examples/example-nordpool-events-state.html" class="nav-link" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
186
+ <script src="/assets/js/runtime~app.47f4f812.js" defer></script><script src="/assets/js/619.8ba1b1f6.js" defer></script><script src="/assets/js/app.b705176c.js" defer></script>
188
187
  </body>
189
188
  </html>
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8">
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
- <link rel="icon" href="/euro.png"><title>Nord Pool and events: state node | 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.714a526c.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.46f7644a.js" as="script">
9
- <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
7
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9857859182772006" crossorigin="anonymous"></script><title>Nord Pool and events: state node | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
+ <link rel="preload" href="/assets/js/runtime~app.47f4f812.js" as="script"><link rel="preload" href="/assets/css/styles.031dcf27.css" as="style"><link rel="preload" href="/assets/js/619.8ba1b1f6.js" as="script"><link rel="preload" href="/assets/js/app.b705176c.js" as="script">
9
+ <link rel="stylesheet" href="/assets/css/styles.031dcf27.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/node-red-contrib-power-saver/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="nord-pool-and-events-state-node" tabindex="-1"><a class="header-anchor" href="#nord-pool-and-events-state-node" aria-hidden="true">#</a> Nord Pool and events: state node</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from the Nord Pool sensor in HA via the <code>events: state</code> node. The <code>ps-lowest-price</code> node is used to control a switch, controlled by <code>call service</code> 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.</p><p><img src="/node-red-contrib-power-saver/assets/img/power-saver-nordpool-events-state.8c392507.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
12
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a href="/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/examples/example-nordpool-events-state.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/examples/example-nordpool-events-state.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/examples/example-nordpool-events-state.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li><li><!--[--><a href="/examples/example-tibber-mqtt.html" class="nav-link sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="nord-pool-and-events-state-node" tabindex="-1"><a class="header-anchor" href="#nord-pool-and-events-state-node" aria-hidden="true">#</a> Nord Pool and events: state node</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from the Nord Pool sensor in HA via the <code>events: state</code> node. The <code>ps-lowest-price</code> node is used to control a switch, controlled by <code>call service</code> 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.</p><p><img src="/assets/img/power-saver-nordpool-events-state.8c392507.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
13
13
  <span class="token punctuation">{</span>
14
14
  <span class="token property">&quot;id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;3662aca5.dfe974&quot;</span><span class="token punctuation">,</span>
15
15
  <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;server-state-changed&quot;</span><span class="token punctuation">,</span>
@@ -167,7 +167,7 @@
167
167
  <span class="token property">&quot;heartbeatInterval&quot;</span><span class="token operator">:</span> <span class="token number">30</span>
168
168
  <span class="token punctuation">}</span>
169
169
  <span class="token punctuation">]</span>
170
- </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/12/2021, 2:17:07 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"> ← <a href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html" class="nav-link" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a></span><span class="next"><a href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html" class="nav-link" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
171
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.714a526c.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.46f7644a.js" defer></script>
170
+ </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/12/2021, 2:17:07 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"> ← <a href="/examples/example-nordpool-current-state.html" class="nav-link" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a></span><span class="next"><a href="/examples/example-tibber-mqtt.html" class="nav-link" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
171
+ <script src="/assets/js/runtime~app.47f4f812.js" defer></script><script src="/assets/js/619.8ba1b1f6.js" defer></script><script src="/assets/js/app.b705176c.js" defer></script>
172
172
  </body>
173
173
  </html>
@@ -4,12 +4,12 @@
4
4
  <meta charset="utf-8">
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
- <link rel="icon" href="/euro.png"><title>Tibber, a switch and MQTT | 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.714a526c.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.46f7644a.js" as="script">
9
- <link rel="stylesheet" href="/node-red-contrib-power-saver/assets/css/styles.e835bef6.css">
7
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9857859182772006" crossorigin="anonymous"></script><title>Tibber, a switch and MQTT | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
8
+ <link rel="preload" href="/assets/js/runtime~app.47f4f812.js" as="script"><link rel="preload" href="/assets/css/styles.031dcf27.css" as="style"><link rel="preload" href="/assets/js/619.8ba1b1f6.js" as="script"><link rel="preload" href="/assets/js/app.b705176c.js" as="script">
9
+ <link rel="stylesheet" href="/assets/css/styles.031dcf27.css">
10
10
  </head>
11
11
  <body>
12
- <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/node-red-contrib-power-saver/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/node-red-contrib-power-saver/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/node-red-contrib-power-saver/examples/example-tibber-mqtt.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="tibber-a-switch-and-mqtt" tabindex="-1"><a class="header-anchor" href="#tibber-a-switch-and-mqtt" aria-hidden="true">#</a> Tibber, a switch and MQTT</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from Tibber and used to turn on/off a switch, scheduled by the <code>ps-best-save</code> node to be off up to 5 hours in a row, but only if at least 5 cents/øre is saved per kWh. Data is also sent to MQTT, for example to be displayed on <a href="https://magicmirror.builders/" target="_blank" rel="noopener noreferrer">Magic Mirror<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><p><img src="/node-red-contrib-power-saver/assets/img/power-saver-tibber-mqtt.16891dd2.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
12
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><!----><span class="site-name">Power Saver</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a href="/guide/" class="nav-link" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/nodes/" class="nav-link" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/examples/" class="nav-link router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/faq/" class="nav-link" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/contribute/" class="nav-link" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-links-item"><a href="/changelog/" class="nav-link" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><p class="sidebar-heading sidebar-item active">Examples</p><ul class=""><li><!--[--><a href="/examples/example-nordpool-current-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/examples/example-nordpool-events-state.html" class="nav-link sidebar-item" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/examples/example-tibber-mqtt.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-item active" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><ul class="sidebar-sub-items"><li><!--[--><a aria-current="page" href="/examples/example-tibber-mqtt.html#description" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/examples/example-tibber-mqtt.html#flow" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--></li></ul><!--]--><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="tibber-a-switch-and-mqtt" tabindex="-1"><a class="header-anchor" href="#tibber-a-switch-and-mqtt" aria-hidden="true">#</a> Tibber, a switch and MQTT</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>In this example, data is read from Tibber and used to turn on/off a switch, scheduled by the <code>ps-best-save</code> node to be off up to 5 hours in a row, but only if at least 5 cents/øre is saved per kWh. Data is also sent to MQTT, for example to be displayed on <a href="https://magicmirror.builders/" target="_blank" rel="noopener noreferrer">Magic Mirror<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><p><img src="/assets/img/power-saver-tibber-mqtt.16891dd2.png" alt="Example with Tibber and MQTT"></p><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
13
13
  <span class="token punctuation">{</span>
14
14
  <span class="token property">&quot;id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;467a5fe.d0bbba&quot;</span><span class="token punctuation">,</span>
15
15
  <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;mqtt out&quot;</span><span class="token punctuation">,</span>
@@ -120,7 +120,6 @@
120
120
  <span class="token property">&quot;minSaving&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0.05&quot;</span><span class="token punctuation">,</span>
121
121
  <span class="token property">&quot;sendCurrentValueWhenRescheduling&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
122
122
  <span class="token property">&quot;outputIfNoSchedule&quot;</span><span class="token operator">:</span> <span class="token string">&quot;true&quot;</span><span class="token punctuation">,</span>
123
- <span class="token property">&quot;scheduleOnlyFromCurrentTime&quot;</span><span class="token operator">:</span> <span class="token string">&quot;false&quot;</span><span class="token punctuation">,</span>
124
123
  <span class="token property">&quot;x&quot;</span><span class="token operator">:</span> <span class="token number">490</span><span class="token punctuation">,</span>
125
124
  <span class="token property">&quot;y&quot;</span><span class="token operator">:</span> <span class="token number">160</span><span class="token punctuation">,</span>
126
125
  <span class="token property">&quot;wires&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span><span class="token string">&quot;467a5fe.d0bbba&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;5e485ff7.db156&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&quot;9c978d1c.ee76&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;467a5fe.d0bbba&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&quot;42d8b632.402e38&quot;</span><span class="token punctuation">]</span><span class="token punctuation">]</span>
@@ -176,7 +175,7 @@
176
175
  <span class="token property">&quot;heartbeatInterval&quot;</span><span class="token operator">:</span> <span class="token number">30</span>
177
176
  <span class="token punctuation">}</span>
178
177
  <span class="token punctuation">]</span>
179
- </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">12/12/2021, 2:17:07 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"> ← <a href="/node-red-contrib-power-saver/examples/example-nordpool-events-state.html" class="nav-link" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a></span><!----></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
180
- <script src="/node-red-contrib-power-saver/assets/js/runtime~app.714a526c.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.46f7644a.js" defer></script>
178
+ </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><span class="meta-item-info">1/16/2022, 10:44:21 PM</span></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"> ← <a href="/examples/example-nordpool-events-state.html" class="nav-link" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a></span><!----></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
179
+ <script src="/assets/js/runtime~app.47f4f812.js" defer></script><script src="/assets/js/619.8ba1b1f6.js" defer></script><script src="/assets/js/app.b705176c.js" defer></script>
181
180
  </body>
182
181
  </html>