{"id":5025,"date":"2026-04-18T07:26:08","date_gmt":"2026-04-18T07:26:08","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=5025"},"modified":"2026-04-18T07:26:10","modified_gmt":"2026-04-18T07:26:10","slug":"maximize-solar-self-consumption-with-home-assistant-and-aio-energy-management-1-0-0","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2026\/04\/18\/maximize-solar-self-consumption-with-home-assistant-and-aio-energy-management-1-0-0\/","title":{"rendered":"Maximize Solar Self-Consumption with Home Assistant and AIO Energy Management 1.0.0"},"content":{"rendered":"\n<p>The AIO Energy Management has finally received the feature planned all along &#8211; it only took me few years to finally figure it out. And since this feature is now out, it&#8217;s a time to celebrate the first major 1.0.0 version of the whole integration \ud83d\ude42<\/p>\n\n\n\n<p>Excess solar feature is intended, as name might suggest, to &#8216;route&#8217; your surplus solar energy to your own devices that can be used to store energy &#8211; like hot water heater, electric floor heating and such. This can be very useful when there&#8217;s no batteries and electricity price is so cheap that it&#8217;s not effective to sell it back to network.<\/p>\n\n\n\n<p>I&#8217;m using this feature for water heater, bathroom floor heating and outdoor hot tub &#8211; storing the extra energy in those devices when available (more examples and use cases later on this post).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"483\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-1024x483.png\" alt=\"\" class=\"wp-image-5048\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-1024x483.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-300x142.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-768x363.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-1536x725.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-2048x967.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-11-at-8.46.27-1920x906.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What You Need to Get Started<\/h2>\n\n\n\n<p>To use this feature, you obviously need a solar energy setup (though direct solar production measurements aren&#8217;t strictly required), a sensor to measure your power grid import\/export, and smart devices to control.<\/p>\n\n\n\n<p>The most accurate way to calculate excess energy is by monitoring the grid directly. While you&nbsp;<em>can<\/em>&nbsp;use your solar production sensor, your&nbsp;<strong>grid export<\/strong>&nbsp;is the true metric of excess\u2014it shows exactly what you are selling back after your home&#8217;s baseline consumption has been met.<\/p>\n\n\n\n<p>Along with these sensors, you will need the AIO Energy Management integration for Home Assistant, which can be installed via HACS.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/my.home-assistant.io\/redirect\/hacs_repository\/?owner=kotope&amp;repository=aio_energy_management&amp;category=integration\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"96\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/68747470733a2f2f6d792e686f6d652d617373697374616e742e696f2f6261646765732f686163735f7265706f7369746f72792e737667.svg\" alt=\"\" class=\"wp-image-5061\" style=\"width:320px\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The Logic (The &#8220;Beef&#8221; of the Component)<\/h2>\n\n\n\n<p>This is the core concept you should understand when setting this up. In the Excess Solar configuration, you define your grid sensor and assign it a buffer (in watts). You also define the devices you want to control, along with the power they drain when active.<\/p>\n\n\n\n<p>When the grid sensor detects enough surplus power (buffer included), it will turn on the first available device it has the capacity to run.<\/p>\n\n\n\n<p>Here is how the smarter logic handles the details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Priority Routing:<\/strong>&nbsp;Smaller numbers equal higher priority. The highest priority item (e.g., priority 1) gets filled up first.<\/li>\n\n\n\n<li><strong>Device Swapping:<\/strong>&nbsp;If a lower-priority, low-consumption device is already running, and more excess power becomes available, the system will swap them. It turns off the lower-priority device and turns on the higher-priority, higher-capacity device. If even more capacity frees up, it turns them both on! The ultimate goal is to keep your surplus solar export as close to zero as possible.<\/li>\n\n\n\n<li><strong>Minimum Run Times:<\/strong>&nbsp;On a semi-cloudy day, it\u2019s not ideal to rapidly cycle your devices on and off as clouds pass by. You can set minimum &#8220;on&#8221; and &#8220;off&#8221; delays to protect your device relays. (More on how to use this creatively in the Tips section below).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration and entities provided by the integration<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">UI Config Flow<\/h3>\n\n\n\n<p>Configuration can be done via legacy YAML or directly through the UI. I&#8217;ll walk through the UI method here. (If you prefer YAML, check out the\u00a0<code><a href=\"https:\/\/github.com\/kotope\/aio_energy_management\/blob\/main\/README.md\" data-type=\"link\" data-id=\"https:\/\/github.com\/kotope\/aio_energy_management\/blob\/main\/README.md\">README.md<\/a><\/code>\u00a0on the <a href=\"https:\/\/github.com\/kotope\/aio_energy_management\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub project page<\/a>).<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Ensure the AIO Energy Management integration is installed.<\/li>\n\n\n\n<li>Go to&nbsp;<strong>Settings -&gt; Devices &amp; Services -&gt; + Add Integration<\/strong>&nbsp;and select AIO Energy Management.<\/li>\n\n\n\n<li>Choose&nbsp;<strong>Excess Solar<\/strong>&nbsp;from the initial selection.<\/li>\n\n\n\n<li>Select your power grid consumption sensor and set your desired buffer (I use 100W).<\/li>\n\n\n\n<li><strong>Add your devices:<\/strong>&nbsp;This step loops, so you can keep adding as many devices as you want to control.\n<ul class=\"wp-block-list\">\n<li><em>Control Entity Name:<\/em>&nbsp;Enter a name for the entity.<\/li>\n\n\n\n<li><em>Static Consumption:<\/em>&nbsp;Add the wattage the device requires to run.<\/li>\n\n\n\n<li><em>Dynamic Consumption (Optional):<\/em>&nbsp;Add an entity that tracks the real consumption value of the device. This helps the integration know exactly when to swap or turn off devices. (If left blank, the static value is always used).&nbsp;<em>Note: This will gain more functionality in future releases.<\/em><\/li>\n\n\n\n<li><em>Priority:<\/em>&nbsp;Set the priority (smaller number = higher priority).<\/li>\n\n\n\n<li><em>Is Schedule On:<\/em>&nbsp;This prevents the solar manager from interfering with existing schedules. If you use the AIO Cheapest Hours feature, just plug that binary sensor in here so the two features don&#8217;t fight over the device.<\/li>\n\n\n\n<li><em>Minimum Delays:<\/em>&nbsp;Usually, 1 to 10 minutes for &#8220;on&#8221; time and 1 minute for &#8220;off&#8221; time is safe, depending on the hardware.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Integration entities<\/h3>\n\n\n\n<p>Once the configuration is complete, some entities are automatically provided by the integration:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Master switch<\/strong> &#8211; this will turn on\/off the whole functionality. This is there so user can either manually or automatically disable\/enable the feature. Useful when you want to sell your energy back to the grid or use it by other means.<\/li>\n<\/ul>\n\n\n\n<p>Each device then are provided with three entities:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Binary sensor<\/strong>: This is the main thing you need to take care of. The integration only creates a binary sensor whether the device should be turned on or off. You need to create an automation that follows this sensor &#8211; similar to the cheapest hours feature. (Example provided in the next section)<\/li>\n\n\n\n<li><strong>Priority number<\/strong>: You can dynamically change the priority of this device. No need to do reconfiguration.<\/li>\n\n\n\n<li><strong>Enabled switch<\/strong>: You can turn on or off controlling of a single device.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"146\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-16-at-16.18.49-300x146.png\" alt=\"\" class=\"wp-image-5067\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-16-at-16.18.49-300x146.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/Screenshot-2026-04-16-at-16.18.49.png 760w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the automation<\/h3>\n\n\n\n<p>Because not all controllable devices are simple smart plugs, you need to write an automation to follow the binary sensor. For instance, my bathroom floor heating is a&nbsp;<em>climate<\/em>&nbsp;entity, so I need to raise the target temperature when there is excess solar, rather than just flipping a switch.<\/p>\n\n\n\n<p>Here&#8217;s an example of a single on-off automation I&#8217;m using for my water heater:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias: \"Excess Solar: Management\"\ndescription: \"\"\ntriggers:\n  - trigger: state\n    entity_id:\n      - binary_sensor.excess_solar_water_heater\n    from:\n      - \"off\"\n    to:\n      - \"on\"\n    id: waterheater_on\n  - trigger: state\n    entity_id:\n      - binary_sensor.excess_solar_water_heater\n    from:\n      - \"on\"\n    to:\n      - \"off\"\n    id: waterheater_off\nconditions: &#91;]\nactions:\n  - choose:\n      - conditions:\n          - condition: trigger\n            id:\n              - waterheater_on\n        sequence:\n          - action: switch.turn_on\n            metadata: {}\n            target:\n              entity_id: switch.water_boiler\n            data: {}\n      - conditions:\n          - condition: trigger\n            id:\n              - waterheater_off\n        sequence:\n          - action: switch.turn_off\n            metadata: {}\n            target:\n              entity_id: switch.water_boiler\n            data: {}\nmode: single<\/code><\/pre>\n\n\n\n<p>And here&#8217;s the thermostat automation. I&#8217;ve created a scene for hi and low states of the thermostat that this automation will activate when surplus energy is provided.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias: \"Excess Solar: Management\"\ndescription: \"\"\ntriggers:\n  - trigger: state\n    entity_id:\n      - binary_sensor.excess_solar_bathroom_heating\n    id: bathroom_on\n    from:\n      - \"off\"\n    to:\n      - \"on\"\n  - trigger: state\n    entity_id:\n      - binary_sensor.excess_solar_bathroom_heating\n    id: bathroom_off\n    from:\n      - \"on\"\n    to:\n      - \"off\"\nconditions: &#91;]\nactions:\n  - choose:\n      - conditions:\n          - condition: trigger\n            id:\n              - bathroom_on\n        sequence:\n          - action: scene.turn_on\n            metadata: {}\n            target:\n              entity_id: scene.heating_bathroom_hi\n            data: {}\n      - conditions:\n          - condition: trigger\n            id:\n              - bathroom_off\n        sequence:\n          - action: scene.turn_on\n            metadata: {}\n            target:\n              entity_id: scene.heating_bathroom_normal\n            data: {}\nmode: single<\/code><\/pre>\n\n\n\n<p><em>(Tip: You can combine all these triggers into one massive automation if you prefer. You can check out my full <a href=\"https:\/\/raw.githubusercontent.com\/kotope\/aio_energy_management\/refs\/heads\/main\/examples\/excess_solar_automation.yaml\" target=\"_blank\" rel=\"noreferrer noopener\">YAML<\/a> setup on GitHub, which handles my spa, floor heating, and water heater).<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Daily Use &amp; Pro Tips<\/h2>\n\n\n\n<p>So far, this feature has been working brilliantly for me\u2014I&#8217;m hitting up to 80-95% self-consumption of my solar! Your results will depend heavily on your solar capacity and the devices you have available to act as energy sinks.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Mix Device Sizes:<\/strong>&nbsp;To get the best results, use a mix of low- and high-consumption devices. If you only have a 3000W heater, you have to wait for a massive solar spike to trigger it. I have a 700W bathroom heater, a 3000W water heater, and a 3000W hot tub. On a sunny day, the bathroom heating triggers early in the morning, followed by the water heater, and finally the hot tub at peak sun.<\/li>\n\n\n\n<li><strong>Tweak the Timers for Optimism:<\/strong>&nbsp;If you want to be more aggressive with your solar usage, increase the &#8220;minimum on time&#8221;. This forces the device to stay on a bit longer even if a cloud passes by, acting as an optimistic buffer. Experimenting with these values can drastically change your self-consumption rate.<\/li>\n\n\n\n<li><strong>Price-Based Overrides:<\/strong>&nbsp;Consider making an automation that toggles the main Excess Solar &#8220;Master Switch&#8221; based on current energy prices. If grid prices spike, it might be more profitable to let the integration turn off and sell the power back instead.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Final Words &amp; What\u2019s Next<\/h2>\n\n\n\n<p>This is just the beginning for the Excess Solar feature. There is still plenty of work to do, and I&#8217;m sure a few bugs will pop up in the wild.<\/p>\n\n\n\n<p>What is currently missing? Right now, it doesn&#8217;t gracefully handle flexible-consumption devices, like EV chargers. In theory, you can set the minimum power to the triggering status and pass the flexible consumption entity as a parameter. However, in my case, my go-e charger has its own built-in solar tracking. If I run both the charger&#8217;s native solar logic and the AIO Excess Solar logic, they fight each other. That\u2019s a puzzle I definitely need to solve in a future update!<\/p>\n\n\n\n<p>If you have ideas for improvements, find any bugs, or want to suggest new features, drop a comment below or open an <a href=\"https:\/\/github.com\/kotope\/aio_energy_management\/issues\" target=\"_blank\" rel=\"noreferrer noopener\">issue<\/a> on the <a href=\"https:\/\/github.com\/kotope\/aio_energy_management\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub project page<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-1024x576.jpg\" alt=\"\" class=\"wp-image-5101\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-1024x576.jpg 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-300x169.jpg 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-768x432.jpg 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-1536x864.jpg 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-2048x1152.jpg 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/PXL_20260417_1509316842-1920x1080.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The AIO Energy Management has finally received the feature planned all along &#8211; it only took me few years to finally figure it out. And&hellip;<\/p>\n","protected":false},"author":1,"featured_media":5100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[100,317],"tags":[401,105,131,106,7,8,310],"class_list":["post-5025","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","category-solar-power","tag-aio-energy-management","tag-automation","tag-energy-management","tag-energy-saving","tag-home-assistant","tag-smart-home","tag-solar-power","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2026\/04\/aio_energy_excess_solar-1.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\/5025","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=5025"}],"version-history":[{"count":65,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/5025\/revisions"}],"predecessor-version":[{"id":5103,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/5025\/revisions\/5103"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/5100"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=5025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=5025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=5025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}