Home Assistant: Entso-E cheapest hours with AIO Energy Management 0.2.0
I’ve got some requests recently to build a support for cheapest prices automation for people using Entso-E API integration and it’s finally here, in a form of AIO Energy Management 0.2.0. Entso-E can be used by most parts of the EU as where Nord Pool only was used by nordic countries.. so now hopefully even more European people can automate their homes to save money in terms of energy prices 🙂
This is a continuation for Nord Pool support on AIO Energy Management so please read technical details and installation of the component from the previous article.
Project is also available to at my GitHub project page. Please feel to open issues, create feature requests or even commit code to the project!
Installing Entso-E integration
Before starting with the AIO Energy Management configurations, Entso-E integration is required to be installed on the Home Assistant. To get Entso-E integration installed, start by checking out Entso-E GitHub project page. The project page contains installation guide and all the necessay information to get API access to Entso-E transparency platform. All credits for JaccoR for his great work with Entso-E.
Configuring AIO Energy Management for Entso-E
AIO Energy Management does not currently support Home Assistant config flow, so all the configuration has to be done directly on configuration.yaml.
When using Entso-E integration instead of Nord Pool, everything works exactly the same: all you need to do is to change nordpool_entity configuration to entsoe_entity. That’s it! (again, ready the previous article if unclear).
Be aware that Entso-E integration provides more than one sensor and the extra attributes required by AIO Energy Management are located on average_price sensor. Use that specific in the entsoe_entity configuration. Here’s a full example to get four cheapest hours from entso-e every night between 20:00-09:00:
aio_energy_management:
cheapest_hours:
- entsoe_entity: sensor.entsoe_average_price
unique_id: my_entsoe_cheapest_hours
name: My Entso-E Cheapest Hours
first_hour: 21
last_hour: 8
starting_today: true
number_of_hours: 4
sequential: false
failsafe_starting: 22
Above configuration will create a binary_sensor entity called ‘My Entso-E Cheapest Hours’ that will have ‘on’ state on the cheapest four hours during the night. You can then create an automation to follow the binary_sensor status to turn on and off devices during cheapest hours.
The above configuration also has a failsafe_starting set to 22 meaning that if no prices are available from entso-e entity, the state will turn to on at 22:00 and off at 02:00 (four hours).
Hi Toni,
thank you for the ENTSO-e integration.
I was trying to use it by copying the example and it took me a while to figure why it didn’t work.
There’s a typo in the unique_id, which is written as unqiue_id.
Regards,
Matt
Well spotted and thanks for reporting! Will fix it immediately. Good thing though that it’s only on documentation rather than in the code itself 🙂
Hi Toni,
Thanks for a great application.
This weekend I started having a problem that the binary sensors are no longer shown by the calander. Is there any way for me to fault-find this error?
Hi!
First ensure you have latest 0.2.2 in use. There were few issues with persistent storage related that triggered on HA reboot. These should now be fixed on the version 0.2.2.
If you are on latest and still having issues, you could enable debug logging by going Home Assistant settings->integrations->AIO Energy Management and press ‘Enable debug logging’. After running a while check if there are any ‘Error’ or ‘Warning’ messages on the log (the log file can be downloaded by disabling the debug logging at the same place).
Hi,
Thanks that did the trick. Had to do a manual update in HACS to discover the new release.
Perhaps I’m misunderstanding the way to set up the config, one can probably configure a lot of smart rules for prices, but after playing around a bit I’ve reached the conclusion that the easiest is to make sure that I’m at all times below the 24h price average. To do that I want a sensor that runs all the time, and just finds the cheapest 12h per 24h cycle. How do I set up a sensor with first_hour and last_hour without a gap in between?
I’ve gotten the following config to work, but it has a gap of one hour:
aio_energy_management:
calendar:
name: My Energy Management Calendar
unique_id: my_energy_management_calendar
cheapest_hours:
– nordpool_entity: sensor.nordpool_kwh_se3
unique_id: below_avg_cost
name: Below 24h avg
first_hour: 16
last_hour: 15
starting_today: true
number_of_hours: 12
sequential: False
failsafe_starting_hour: 16
That should contain full 24 hours. last_hour is the starting time of the final hour. So starting 15.00 will end at 16:00. That should create you a full 24h cycle.
If not, there’s a bug involved in my code that needs to be fixed. 🙂
By the way, I’d suggest to put the slot a bit later just to be sure the nord pool data is available, unless you have some specific reason to keep it on that timeframe.
E.g. sometimes (at least on Finland) the data received have been delayed for some unknown reason and the data might not be there at 15:00 GMT+3.
Cool, I got it to work with entso-e. I am currently fiddling with an apexcharts graph in a template config card showing the energy prices per hour and use annotations to show green and red overlays for the most expensive and cheapest slots. The green and red overlays use the attribute data in the aio sensors. It works, but is limited to showing one green and one red slot each. Since the number of slots can be 0 (briefly when new prices come in), 1 or 2, trying to read 2 slots when there are fewer breaks the apexcharts card.
I have some more fiddling to do to figure out how I can make the card handle missing attribute properties gracefully. Happy to post the code for the card so far, if anyone wants it.