In previous post Home Assistant: Nord Pool Spot prices and how to automate devices for cheapest hours I created an automation that uses Nord Pool Spot prices for automations, but the examples were not complete and I got lots of questions how to finalise and/or improve the code to do specific things like setting the end time.
In this post I’m going to tackle the installation issue and give a a full example (using packages) that can be easily copy-pasted to your own environment.
Using the cheapest hours package
Before continuing, please read the original post and setup the Nord Pool integration (and Apex charts if you wish) if you already haven’t!
I’m using packages throughout my whole Home Assistant instance. It groups each functionality to its own files instead of mixed amount with configuration.yaml, automation.yaml, etc.. So, just copy paste the nordpool_cheapest_hours.yaml from my GitHub repository to the Home Assistant config folder and set the following lines in the configuration.yaml:
homeassistant: packages: nordpool_cheapest_hours: !include nordpool_cheapest_hours.yaml
Of course you should also change the entities and modify the automation for your own purposes. That I cannot ready for you, look out the #CHANGE-ME tags from inside the nordpool_cheapest_hours.yaml
After that just restart your Home Assistant and everything should be ready and cheapest hours automation be running properly!
If in doubt or having issues, feel free to leave a comment!
Tip: you can also move your Nord Pool integration configurations to the package file to keep the configuration.yaml more clear.