{"id":4341,"date":"2025-03-22T09:07:04","date_gmt":"2025-03-22T09:07:04","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=4341"},"modified":"2025-10-05T12:53:19","modified_gmt":"2025-10-05T12:53:19","slug":"home-assistant-whats-new-in-aio-energy-management-0-3-x-and-0-4-0","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2025\/03\/22\/home-assistant-whats-new-in-aio-energy-management-0-3-x-and-0-4-0\/","title":{"rendered":"Home Assistant: What&#8217;s new in AIO Energy Management 0.3.x and 0.4.0"},"content":{"rendered":"\n<p><a href=\"https:\/\/github.com\/kotope\/aio_energy_management\" data-type=\"link\" data-id=\"https:\/\/github.com\/kotope\/aio_energy_management\">The AIO Energy Management integration for Home <\/a>Assistant has been slowly, but steadily improving. Since I didn&#8217;t publish an article for version 0.3.0, let&#8217;s explore the changes from v0.3.x to v0.4.0 and delve into practical usage examples of the new features.<\/p>\n\n\n\n<p>If you are unfamiliar with the AIO Energy Management integration, go check the previous articles <a href=\"https:\/\/www.creatingsmarthome.com\/index.php\/tag\/aio-energy-management\/\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">New attributes (v0.3.3)<\/h2>\n\n\n\n<p>Version 0.3.3 introduced several new read-only attributes, enhancing automation and information retrieval. These attributes include <strong>minimum, maximum, and mean prices<\/strong>, specifically calculated from the current cheapest hours sequence. For instance, you can determine the mean price of a set number of cheapest hours. This allows for direct comparison with the full-day average, highlighting potential cost savings by utilizing the cheapest hours.<\/p>\n\n\n\n<p><strong>Example Use Case:<\/strong>&nbsp;Compare the mean price of your five cheapest hours to the overall daily average to quantify potential savings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"121\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-22-at-9.30.02-1024x121.png\" alt=\"\" class=\"wp-image-4368\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-22-at-9.30.02-1024x121.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-22-at-9.30.02-300x36.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-22-at-9.30.02-768x91.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-22-at-9.30.02.png 1064w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">New service to clear cached data (v0.3.2)<\/h2>\n\n\n\n<p>Previously, configuration changes required users to wait until the next day for updated flexible energy prices. Now, the AIO Energy Management service&nbsp;<code>clear_data<\/code>&nbsp;allows immediate data flushing for a selected sensor.<\/p>\n\n\n\n<p>This service can be invoked through automations or the developer tools&#8217; &#8220;Services&#8221; section. The&nbsp;<code>unique_id<\/code>&nbsp;parameter of the sensor (specified during configuration) is mandatory.<\/p>\n\n\n\n<p><strong>Example Service Call:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service: aio_energy_management.clear_data\ndata:\n  unique_id: my_cheapest_hours<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">New configurations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Price limit (v0.3.0 &#8211; v0.3.1)<\/h3>\n\n\n\n<p>Initially introduced as&nbsp;<code>max_price<\/code>&nbsp;in v0.3.0, this was quickly renamed to&nbsp;<code>price_limit<\/code>&nbsp;in v0.3.1 for clarity, especially regarding inverted functionality (e.g., finding the most expensive hours).<\/p>\n\n\n\n<p>The price limit is valuable for restricting cheapest hours usage to periods below a specific price. For example, I use it to heat my outdoor hot tub only when prices are below 5 cents\/kWh. Note that if the price limit isn&#8217;t met, heating might be skipped, which is acceptable for my hot tub&#8217;s heat retention.<\/p>\n\n\n\n<p>The price limit can also reference an entity&#8217;s value. Simply enter the&nbsp;<code>entity_id<\/code>&nbsp;in the&nbsp;<code>price_limit<\/code>&nbsp;variable (e.g.,&nbsp;<code>price_limit: input_number.example_entity<\/code>). Ensure the value is a decimal number (e.g.,&nbsp;<code>5.0<\/code>).<\/p>\n\n\n\n<p><strong>Example Configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cheapest_hours:\n   - nordpool_entity: sensor.nordpool\n     unique_id: cheapest_hours_hot_tub\n     name: Cheapest Hours Hot Tub\n     first_hour: 0\n     last_hour: 23\n     starting_today: false\n     number_of_hours: 5\n     sequential: false\n     price_limit: 5.0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Trigger Hour (v0.3.0 &#8211; v0.3.1)<\/h3>\n\n\n\n<p>Implemented in v0.3.0 and refined in v0.3.1, the trigger hour delays calculations until specific conditions are met.<\/p>\n\n\n\n<p>Without a trigger hour, calculations occur immediately after flexible energy prices are published. The trigger hour enables calculations at a predetermined time, such as evening, when usage patterns are known. This is useful for adjusting&nbsp;<code>number_of_hours<\/code>&nbsp;based on daily consumption.<\/p>\n\n\n\n<p><code>trigger_hour<\/code>&nbsp;accepts an integer, representing the hour when calculations begin.<\/p>\n\n\n\n<p><strong>Example Configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cheapest_hours:\n  - nordpool_entity: sensor.nordpool\n    unique_id: cheapest_hours_water_boiler\n    name: Cheapest Hours Water Boiler\n    first_hour: 21\n    last_hour: 12\n    starting_today: true\n    number_of_hours: sensor.water_heater_number_of_hours\n    sequential: false\n    failsafe_starting_hour: 1\n    trigger_hour: 21\n<\/code><\/pre>\n\n\n\n<p><em><strong>Note:<\/strong>&nbsp;The trigger hour will be further refined in future releases to accept hour and minute sub-parameters.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable\/disable calendar (0.3.3)<\/h3>\n\n\n\n<p>This enhancement allows disabling calendar entries for sensors used e.g. solely as automation helpers. Add&nbsp;<code>calendar: false<\/code> to the sensor configuration. By default, sensors are displayed on the calendar.<\/p>\n\n\n\n<p><strong>Example Configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cheapest_hours:\n  - nordpool_entity: sensor.nordpool\n    unique_id: my_cheapest_hours_helper\n    name: Just a helper cheapest hours\n    first_hour: 21\n    last_hour: 12\n    starting_today: true\n    number_of_hours: 3\n    sequential: false\n    trigger_hour: 21\n    calendar: false\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Offset (v0.4.0)<\/h3>\n\n\n\n<p>The offset feature adds buffers to the start or end of the cheapest hours sequence. This is useful for accommodating variable usage. For example, adding a buffer to the end of a water heating sequence to ensure sufficient heating.<\/p>\n\n\n\n<p><strong>Important Considerations:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the end offset extends past the last hour, the expiration time is extended, potentially causing sequence overlaps on the calendar. This does not affect binary sensor functionality.<\/li>\n\n\n\n<li>Min, Max, and mean price attributes do not account for offsets.<\/li>\n\n\n\n<li>When using non-sequential, start offset only happens at the first selected hour, and end offset at the last selected hour.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example Configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  cheapest_hours:\n    - nordpool_entity: sensor.nordpool\n      unique_id: my_cheapest_hours_sensor_offset\n      name: My Cheapest Hours Official Offset\n      first_hour: 0\n      last_hour: 23\n      starting_today: false\n      number_of_hours: 3\n      sequential: True\n      failsafe_starting_hour: 22\n      offset:\n        start:\n          hours: 0\n          minutes: 30\n        end:\n          hours: 1\n          minutes: 2\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Official Nord Pool Integration Support (v0.4.0)<\/h2>\n\n\n\n<p>Version 0.4.0 introduces compatibility with <a href=\"https:\/\/www.home-assistant.io\/integrations\/nordpool\/\" data-type=\"link\" data-id=\"https:\/\/www.home-assistant.io\/integrations\/nordpool\/\" target=\"_blank\" rel=\"noreferrer noopener\">the official Home Assistant Nord Pool integration<\/a>. This integration uses a service to fetch data, requiring the configuration entry ID instead of an entity ID.<\/p>\n\n\n\n<p>To obtain the configuration entry ID, navigate to &#8220;Devices &amp; Services&#8221; -&gt; &#8220;Nord Pool integration&#8221; -&gt; &#8220;Entities&#8221; and copy the last part of the browser URL.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2930\" height=\"1522\" data-id=\"4357\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20.png\" alt=\"\" class=\"wp-image-4357\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20.png 2930w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-300x156.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-1024x532.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-768x399.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-1536x798.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-2048x1064.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.20-1920x997.png 1920w\" sizes=\"auto, (max-width: 2930px) 100vw, 2930px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"2932\" height=\"1492\" data-id=\"4356\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32.png\" alt=\"\" class=\"wp-image-4356\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32.png 2932w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-300x153.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-1024x521.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-768x391.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-1536x782.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-2048x1042.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/Screenshot-2025-03-20-at-17.33.32-1920x977.png 1920w\" sizes=\"auto, (max-width: 2932px) 100vw, 2932px\" \/><\/figure>\n<\/figure>\n\n\n\n<p><strong>Example Configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> cheapest_hours:\n  - nordpool_official_config_entry: 01JPHC0B39ST11081WFZQCKMVC\n    unique_id: my_cheapest_hours_sensor_official\n    name: My Cheapest Hours Official\n    first_hour: 22\n    last_hour: 10\n    starting_today: true\n    number_of_hours: 3\n    sequential: False\n    failsafe_starting_hour: 22<\/code><\/pre>\n\n\n\n<p>The official Nord Pool integration functions similarly to the custom component or Entso-E integrations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The AIO Energy Management integration for Home Assistant has been slowly, but steadily improving. Since I didn&#8217;t publish an article for version 0.3.0, let&#8217;s explore&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4371,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[100],"tags":[401,224,106,402,7,218],"class_list":["post-4341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","tag-aio-energy-management","tag-cheapest-hours","tag-energy-saving","tag-entso-e","tag-home-assistant","tag-nord-pool","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/aio_energy_v0.4.0.png","author_info":{"display_name":"Toni","author_link":"https:\/\/www.creatingsmarthome.com\/index.php\/author\/topsy\/"},"_links":{"self":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/comments?post=4341"}],"version-history":[{"count":30,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4341\/revisions"}],"predecessor-version":[{"id":4623,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4341\/revisions\/4623"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/4371"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=4341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=4341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=4341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}