node-red-contrib-power-saver 3.4.2 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/docs/.vuepress/config.js +8 -2
  2. package/docs/.vuepress/dist/.nojekyll +0 -0
  3. package/docs/.vuepress/dist/404.html +4 -4
  4. package/docs/.vuepress/dist/Ukraine-heart-shape-flag.png +0 -0
  5. package/docs/.vuepress/dist/assets/js/app.6c6c1409.js +1 -0
  6. package/docs/.vuepress/dist/changelog/index.html +4 -4
  7. package/docs/.vuepress/dist/contribute/index.html +4 -4
  8. package/docs/.vuepress/dist/examples/example-cascade-temperature-control.html +4 -4
  9. package/docs/.vuepress/dist/examples/example-heat-capacitor.html +4 -4
  10. package/docs/.vuepress/dist/examples/example-next-schedule-entity.html +4 -4
  11. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +4 -4
  12. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +4 -4
  13. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +4 -4
  14. package/docs/.vuepress/dist/examples/index.html +4 -4
  15. package/docs/.vuepress/dist/faq/best-save-viewer.html +4 -4
  16. package/docs/.vuepress/dist/faq/index.html +4 -4
  17. package/docs/.vuepress/dist/guide/index.html +4 -4
  18. package/docs/.vuepress/dist/index.html +4 -4
  19. package/docs/.vuepress/dist/nodes/index.html +4 -4
  20. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +4 -4
  21. package/docs/.vuepress/dist/nodes/power-saver.html +4 -4
  22. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +4 -4
  23. package/docs/.vuepress/dist/nodes/ps-general-add-tariff.html +4 -4
  24. package/docs/.vuepress/dist/nodes/ps-receive-price.html +4 -4
  25. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +4 -4
  26. package/docs/.vuepress/dist/nodes/ps-strategy-heat-capacitor.html +4 -4
  27. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +4 -4
  28. package/docs/.vuepress/dist/nodes/strategy-input.html +4 -4
  29. package/docs/.vuepress/public/Ukraine-heart-shape-flag.png +0 -0
  30. package/docs/changelog/README.md +4 -0
  31. package/package.json +1 -1
  32. package/src/elvia/elvia-add-tariff.html +7 -1
  33. package/src/elvia/elvia-config.js +7 -0
  34. package/src/elvia/elvia-tariff-types.js +0 -6
  35. package/.firebase/hosting.ZG9jcy8udnVlcHJlc3MvZGlzdA.cache +0 -94
  36. package/docs/.vuepress/dist/assets/js/app.dfdee6f9.js +0 -1
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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>Simple heat capacitor strategy flow | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></script><title>Simple heat capacitor strategy flow | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-heat-capacitor.html#description" class="router-link-active router-link-exact-active sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#requirements" class="router-link-active router-link-exact-active sidebar-item" aria-label="Requirements"><!--[--><!--]--> Requirements <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#instructions" class="router-link-active router-link-exact-active sidebar-item" aria-label="Instructions"><!--[--><!--]--> Instructions <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-heat-capacitor.html#advanced-set-up" class="router-link-active router-link-exact-active sidebar-item" aria-label="Advanced set-up"><!--[--><!--]--> Advanced set-up <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#flow" class="router-link-active router-link-exact-active sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="simple-heat-capacitor-strategy-flow" tabindex="-1"><a class="header-anchor" href="#simple-heat-capacitor-strategy-flow" aria-hidden="true">#</a> Simple heat capacitor strategy flow</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>The heat capacitor strategy utilizes a large body of mass, like your house or cabin, to procure heat at a time where electricity is cheap, and divest at a time where electricity is expensive.</p><p>This is achieved by increasing the temperature setpoint of one or several climate entities at times when electricity is cheap, and reducing it when electricity is expensive.</p><p>It is a good application for cabins/heated storage spaces, as the entity never actually shuts off the climate entities and should therefore be rather safe to apply (still at you own risk 😃). It can also be used for you house, jacuzzi, and/or pool.</p><p><img src="/assets/img/heat-capacitor-temperatureVsPrice.6e74905b.png" alt="Temperature profile vs. cost"></p><hr><h2 id="requirements" tabindex="-1"><a class="header-anchor" href="#requirements" aria-hidden="true">#</a> Requirements</h2><blockquote><p>Home assistant integrated with Node-RED</p></blockquote><blockquote><p>Tibber node installed and correctly configured</p></blockquote><blockquote><p>A climate entity</p></blockquote><h2 id="instructions" tabindex="-1"><a class="header-anchor" href="#instructions" aria-hidden="true">#</a> Instructions</h2><blockquote><p>Create an <code>input_number</code> entity in Home Assistant named <code>setpoint</code></p></blockquote><blockquote><p>Import the flow into Node-RED</p></blockquote><blockquote><p>Configure the heat-capacitor node:</p></blockquote><ul><li>Insert an approximate time it takes to increase the temperature by 1 Centigrade (could be 90 minutes)</li><li>Insert an approximate time it takes to decrease 1 Centigrade</li><li>Insert minimum savings for a heating/cooling cycle (should not be zero, as a cycle might have a cost)</li></ul><blockquote><p>Configure the climate service to target the correct climate entity (this has to be edited in two places)</p></blockquote><ul><li>Change <code>Entity Id</code> in the properties menu</li><li>Change the <code>entity_id</code> value in the <code>Data</code> property</li></ul><blockquote><p>(optional) If the <code>input_number</code> entity was named something else than <code>setpoint</code>, change the <code>entity_id</code> of the <code>Setpoint</code> node accordingly.</p></blockquote><h3 id="advanced-set-up" tabindex="-1"><a class="header-anchor" href="#advanced-set-up" aria-hidden="true">#</a> Advanced set-up</h3><blockquote><p>Replace the <code>Set temperature</code> node with a <a href="/examples/example-cascade-temperature-control.html" class="">Cascade controller</a> to improve the heaters accuracy and response time.</p></blockquote><hr><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><p><img src="/assets/img/node-ps-strategy-heat-capacitor-simple-flow-example.29d9bf59.png" alt="Simple example with Tibber"></p><hr><details class="custom-container details"><summary>[Flow code]</summary><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-heat-capacitor.html#description" class="router-link-active router-link-exact-active sidebar-item" aria-label="Description"><!--[--><!--]--> Description <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#requirements" class="router-link-active router-link-exact-active sidebar-item" aria-label="Requirements"><!--[--><!--]--> Requirements <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#instructions" class="router-link-active router-link-exact-active sidebar-item" aria-label="Instructions"><!--[--><!--]--> Instructions <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-heat-capacitor.html#advanced-set-up" class="router-link-active router-link-exact-active sidebar-item" aria-label="Advanced set-up"><!--[--><!--]--> Advanced set-up <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a aria-current="page" href="/examples/example-heat-capacitor.html#flow" class="router-link-active router-link-exact-active sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="simple-heat-capacitor-strategy-flow" tabindex="-1"><a class="header-anchor" href="#simple-heat-capacitor-strategy-flow" aria-hidden="true">#</a> Simple heat capacitor strategy flow</h1><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>The heat capacitor strategy utilizes a large body of mass, like your house or cabin, to procure heat at a time where electricity is cheap, and divest at a time where electricity is expensive.</p><p>This is achieved by increasing the temperature setpoint of one or several climate entities at times when electricity is cheap, and reducing it when electricity is expensive.</p><p>It is a good application for cabins/heated storage spaces, as the entity never actually shuts off the climate entities and should therefore be rather safe to apply (still at you own risk 😃). It can also be used for you house, jacuzzi, and/or pool.</p><p><img src="/assets/img/heat-capacitor-temperatureVsPrice.6e74905b.png" alt="Temperature profile vs. cost"></p><hr><h2 id="requirements" tabindex="-1"><a class="header-anchor" href="#requirements" aria-hidden="true">#</a> Requirements</h2><blockquote><p>Home assistant integrated with Node-RED</p></blockquote><blockquote><p>Tibber node installed and correctly configured</p></blockquote><blockquote><p>A climate entity</p></blockquote><h2 id="instructions" tabindex="-1"><a class="header-anchor" href="#instructions" aria-hidden="true">#</a> Instructions</h2><blockquote><p>Create an <code>input_number</code> entity in Home Assistant named <code>setpoint</code></p></blockquote><blockquote><p>Import the flow into Node-RED</p></blockquote><blockquote><p>Configure the heat-capacitor node:</p></blockquote><ul><li>Insert an approximate time it takes to increase the temperature by 1 Centigrade (could be 90 minutes)</li><li>Insert an approximate time it takes to decrease 1 Centigrade</li><li>Insert minimum savings for a heating/cooling cycle (should not be zero, as a cycle might have a cost)</li></ul><blockquote><p>Configure the climate service to target the correct climate entity (this has to be edited in two places)</p></blockquote><ul><li>Change <code>Entity Id</code> in the properties menu</li><li>Change the <code>entity_id</code> value in the <code>Data</code> property</li></ul><blockquote><p>(optional) If the <code>input_number</code> entity was named something else than <code>setpoint</code>, change the <code>entity_id</code> of the <code>Setpoint</code> node accordingly.</p></blockquote><h3 id="advanced-set-up" tabindex="-1"><a class="header-anchor" href="#advanced-set-up" aria-hidden="true">#</a> Advanced set-up</h3><blockquote><p>Replace the <code>Set temperature</code> node with a <a href="/examples/example-cascade-temperature-control.html" class="">Cascade controller</a> to improve the heaters accuracy and response time.</p></blockquote><hr><h2 id="flow" tabindex="-1"><a class="header-anchor" href="#flow" aria-hidden="true">#</a> Flow</h2><p><img src="/assets/img/node-ps-strategy-heat-capacitor-simple-flow-example.29d9bf59.png" alt="Simple example with Tibber"></p><hr><details class="custom-container details"><summary>[Flow code]</summary><div class="language-json ext-json"><pre class="language-json"><code><span class="token punctuation">[</span>
31
31
  <span class="token punctuation">{</span>
32
32
  <span class="token property">&quot;id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;135c4e7649611314&quot;</span><span class="token punctuation">,</span>
33
33
  <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;tab&quot;</span><span class="token punctuation">,</span>
@@ -242,6 +242,6 @@
242
242
  <span class="token punctuation">}</span>
243
243
  <span class="token punctuation">]</span>
244
244
  </code></pre></div></details><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/examples/example-tibber-mqtt.html" class="" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a></span><span class="next"><a href="/examples/example-cascade-temperature-control.html" class="" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
245
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
245
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
246
246
  </body>
247
247
  </html>
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></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">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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="external-link-icon" 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="external-link-icon-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="external-link-icon" 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="external-link-icon-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>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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="external-link-icon" 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="external-link-icon-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="external-link-icon" 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="external-link-icon-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>
31
31
  <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>
32
32
  <span class="token keyword">var</span> schedule <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token literal-property property">time</span><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> <span class="token literal-property property">topic</span><span class="token operator">:</span> <span class="token string">&quot;Neste spareperiode&quot;</span><span class="token punctuation">,</span> <span class="token literal-property property">length</span><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> <span class="token literal-property property">savings</span><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>
33
33
  <span class="token keyword">break</span><span class="token punctuation">}</span>
@@ -38,6 +38,6 @@
38
38
  <span class="token keyword">var</span> schedule_array <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token literal-property property">upcoming</span><span class="token operator">:</span> schedule<span class="token punctuation">}</span>
39
39
  <span class="token keyword">return</span> <span class="token punctuation">[</span>schedule_array<span class="token punctuation">]</span>
40
40
  </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><!----></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
41
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
41
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
42
42
  </body>
43
43
  </html>
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></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">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-current-state.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-current-state.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-nordpool-events-state.html" class="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-current-state.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Nord Pool and current state node"><!--[--><!--]--> Nord Pool and current state node <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-current-state.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-nordpool-events-state.html" class="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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>
31
31
  <span class="token punctuation">{</span>
32
32
  <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>
33
33
  <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>
@@ -201,6 +201,6 @@
201
201
  <span class="token punctuation">}</span>
202
202
  <span class="token punctuation">]</span>
203
203
  </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><nav class="page-nav"><p class="inner"><!----><span class="next"><a href="/examples/example-nordpool-events-state.html" class="" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
204
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
204
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
205
205
  </body>
206
206
  </html>
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></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">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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 router-link-active sidebar-item active" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-events-state.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-tibber-mqtt.html" class="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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 router-link-active sidebar-item active" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-nordpool-events-state.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-tibber-mqtt.html" class="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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>
31
31
  <span class="token punctuation">{</span>
32
32
  <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>
33
33
  <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>
@@ -186,6 +186,6 @@
186
186
  <span class="token punctuation">}</span>
187
187
  <span class="token punctuation">]</span>
188
188
  </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/examples/example-nordpool-current-state.html" class="" 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="" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
189
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
189
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
190
190
  </body>
191
191
  </html>
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></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">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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 router-link-active sidebar-item active" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-tibber-mqtt.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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="external-link-icon" 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="external-link-icon-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>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a href="/examples/" class="router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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 router-link-active sidebar-item active" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/examples/example-tibber-mqtt.html#description" class="router-link-active router-link-exact-active 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 sidebar-item" aria-label="Flow"><!--[--><!--]--> Flow <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></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="external-link-icon" 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="external-link-icon-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>
31
31
  <span class="token punctuation">{</span>
32
32
  <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>
33
33
  <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>
@@ -194,6 +194,6 @@
194
194
  <span class="token punctuation">}</span>
195
195
  <span class="token punctuation">]</span>
196
196
  </code></pre></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/examples/example-nordpool-events-state.html" class="" aria-label="Nord Pool and events: state node"><!--[--><!--]--> Nord Pool and events: state node <!--[--><!--]--></a></span><span class="next"><a href="/examples/example-heat-capacitor.html" class="" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
197
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
197
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
198
198
  </body>
199
199
  </html>
@@ -22,12 +22,12 @@
22
22
  document.documentElement.classList.toggle('dark', true);
23
23
  }
24
24
  </script>
25
- <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>Examples | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
26
- <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.dfdee6f9.js" as="script">
25
+ <link rel="shortcut icon" type="image/x-icon" href="euro.png"><script async src="https://www.googletagmanager.com/gtag/js?id=G-Z2QNNCDQZG"></script><script src="window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z2QNNCDQZG');"></script><title>Examples | Power Saver</title><meta name="description" content="A Node-RED note to save money on hourly changing power prices">
26
+ <link rel="preload" href="/assets/js/runtime~app.f6ac32d7.js" as="script"><link rel="preload" href="/assets/css/styles.1c48cbd0.css" as="style"><link rel="preload" href="/assets/js/405.f4edd94d.js" as="script"><link rel="preload" href="/assets/js/app.6c6c1409.js" as="script">
27
27
  <link rel="stylesheet" href="/assets/css/styles.1c48cbd0.css">
28
28
  </head>
29
29
  <body>
30
- <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a aria-current="page" href="/examples/" class="router-link-active router-link-exact-active router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a aria-current="page" href="/examples/" class="router-link-active router-link-exact-active router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="examples" tabindex="-1"><a class="header-anchor" href="#examples" aria-hidden="true">#</a> Examples</h1><p><a href="./example-nordpool-current-state">Nord Pool and <code>current state</code> node in HA</a></p><p><a href="./example-nordpool-events-state">Nord Pool and <code>events: state</code> node in HA</a></p><p><a href="./example-tibber-mqtt">Tibber and mqtt</a></p><p><a href="./example-heat-capacitor">Heat capacitor strategy - simple flow</a></p><p><a href="./example-cascade-temperature-control">Cascade temperature control</a></p><h2 id="user-provided-examples" tabindex="-1"><a class="header-anchor" href="#user-provided-examples" aria-hidden="true">#</a> User provided examples</h2><p><a href="/examples/example-next-schedule-entity.html" class="">Output schedule to a sensor entity</a> (by Stefan)</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
31
- <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.dfdee6f9.js" defer></script>
30
+ <div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" 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=""><img class="logo" src="/Ukraine-heart-shape-flag.png" alt="Power Saver"><span class="site-name can-hide">Power Saver</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a aria-current="page" href="/examples/" class="router-link-active router-link-exact-active router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-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-items"><!--[--><div class="navbar-item"><a href="/guide/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/nodes/" class="" aria-label="Nodes"><!--[--><!--]--> Nodes <!--[--><!--]--></a></div><div class="navbar-item"><a aria-current="page" href="/examples/" class="router-link-active router-link-exact-active router-link-active" aria-label="Examples"><!--[--><!--]--> Examples <!--[--><!--]--></a></div><div class="navbar-item"><a href="/faq/" class="" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contribute/" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a href="/changelog/" class="" aria-label="Changes"><!--[--><!--]--> Changes <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/ottopaulsen/node-red-contrib-power-saver" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" 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="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading">Examples <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a href="/examples/example-nordpool-current-state.html" class="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="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="sidebar-item" aria-label="Tibber, a switch and MQTT"><!--[--><!--]--> Tibber, a switch and MQTT <!--[--><!--]--></a><!----></li><li><a href="/examples/example-heat-capacitor.html" class="sidebar-item" aria-label="Simple heat capacitor strategy flow"><!--[--><!--]--> Simple heat capacitor strategy flow <!--[--><!--]--></a><!----></li><li><a href="/examples/example-cascade-temperature-control.html" class="sidebar-item" aria-label="Cascade temperature control"><!--[--><!--]--> Cascade temperature control <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="examples" tabindex="-1"><a class="header-anchor" href="#examples" aria-hidden="true">#</a> Examples</h1><p><a href="./example-nordpool-current-state">Nord Pool and <code>current state</code> node in HA</a></p><p><a href="./example-nordpool-events-state">Nord Pool and <code>events: state</code> node in HA</a></p><p><a href="./example-tibber-mqtt">Tibber and mqtt</a></p><p><a href="./example-heat-capacitor">Heat capacitor strategy - simple flow</a></p><p><a href="./example-cascade-temperature-control">Cascade temperature control</a></p><h2 id="user-provided-examples" tabindex="-1"><a class="header-anchor" href="#user-provided-examples" aria-hidden="true">#</a> User provided examples</h2><p><a href="/examples/example-next-schedule-entity.html" class="">Output schedule to a sensor entity</a> (by Stefan)</p><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
31
+ <script src="/assets/js/runtime~app.f6ac32d7.js" defer></script><script src="/assets/js/405.f4edd94d.js" defer></script><script src="/assets/js/app.6c6c1409.js" defer></script>
32
32
  </body>
33
33
  </html>