Since the update the sensor hasn’t been unavailable again, so it looks like the bug is fixed! Thank you again for your quick support and enjoy your
Dit it also turn on
at the cheapest moment?
Update
v5.1.0
IMPROVEMENTS
- This version adds support for data sources which don’t provide the date and time in the list with prices. 2 new parameters are added:
datetime_in_data
(defaults totrue
) anddata_minutes
(defaults to60
, only used whendatetime_in_data
is set tofalse
). More information can be found in the documentation
What’s Changed
- Add support for data source without datetime by @TheFes in Add support for data source without datetime by TheFes · Pull Request #107 · TheFes/cheapest-energy-hours · GitHub
Full Changelog: Comparing v5.0.3...v5.1.0 · TheFes/cheapest-energy-hours · GitHub
Yes it did turn on. I made a steel column for the final 3 phase charger, but the paint is still drying. Once I’ve installed the final charger I’ll be able to use the sensor to charge the car. Then I can see if it fully works as intended, but I have no reason to think it won’t.
Are you open to adding examples/settings for specific energy providers to the github repo? That way people with Zonneplan can easily use my config and others could add other providers.
The only differences per energy provider are in the source data settings. But I’m open to adding another section there with the attribute and key settings for each provider.
Update
v5.2.0
IMPROVEMENTS
- The parameter
latest_possible
has been added. This defaults tofalse
, but when set totrue
it will use the end of the time block in case all prices are the same instead of the start. This can be useful if you want to turn on a boiler during the night, and want to avoid the water cools down again while you are sleeping. - The parameter
price_tolerance
has been added. This allows to set a tolerance within prices will be considered lowest. Eg, if the lowest price is0.042
and you setprice_tolerance=0.005
all prices up to0.047
will also be considered lowest. Whenlowest=false
the same applies to the highest prices. - More information can be found in the documentation.
DOCUMENTATION
- Provider settings have been added to the README, you can help by providing the settings for your provider. See documentation for more information.
What’s Changed
- add provider settings by @TheFes in add provider settings by TheFes · Pull Request #108 · TheFes/cheapest-energy-hours · GitHub
- add Zonneplan parameters by @TheFes in add Zonneplan parameters by TheFes · Pull Request #109 · TheFes/cheapest-energy-hours · GitHub
- Add
latest_possible
andprice_tolerance
by @TheFes in Add `latest_possible` and `price_tolerance` by TheFes · Pull Request #112 · TheFes/cheapest-energy-hours · GitHub
Full Changelog: Comparing v5.1.0...v5.2.0 · TheFes/cheapest-energy-hours · GitHub
Update
v5.3.0
IMPROVEMENTS
- A new mode:
extreme_now
has been added. This will returntrue
in case the current price matches the lowest price (or highest price in caselowest=false
). When used in combination withprice_tolerance
, which was added in v5.2.0, it will also betrue
if the current price is within the set tolerance compared to the lowest (or highest) price. price_tolerance
now accepts percentages. So you can use something likeprice_tolerance="5%"
instead of a fixed tolerance. The percentage will be used to calculate the price tolerance based on the lowest price in your time range (or hightest price whenlowest=false
)
DOCUMENTATION
- Provider settings for EnergyZero have been added. These settings require to setup a trigger based template sensor to make the prices availalbe for the macro. See documentation.
BUG FIXES
- The parameters for ENTSO-E were not correct, Thanks @DutchDeffy for fixing this
- There was a bug for
mode='is_now'
whensplit
was set totrue
. This has been fixed by @Fizz55. Thanks for that!
What’s Changed
- Docs source parameter ENTSO time_key by @DutchDeffy in Docs source parameter ENTSO time_key by DutchDeffy · Pull Request #113 · TheFes/cheapest-energy-hours · GitHub
- Add
extreme_now
mode by @TheFes in Add `extreme_now` mode by TheFes · Pull Request #118 · TheFes/cheapest-energy-hours · GitHub - allow percentages for price_tolerance by @TheFes in allow percentages for price_tolerance by TheFes · Pull Request #119 · TheFes/cheapest-energy-hours · GitHub
- Fix is_now binary_sensor output for split mode by @Fizz55 in Fix is_now binary_sensor output for split mode by Fizz55 · Pull Request #117 · TheFes/cheapest-energy-hours · GitHub
- Add EnergyZero provider settings by @TheFes in Add EnergyZero provider settings by TheFes · Pull Request #120 · TheFes/cheapest-energy-hours · GitHub
- Small change on EnergyZero sensor information by @TheFes in Small change on EnergyZero sensor information by TheFes · Pull Request #121 · TheFes/cheapest-energy-hours · GitHub
New Contributors
- @DutchDeffy made their first contribution in Docs source parameter ENTSO time_key by DutchDeffy · Pull Request #113 · TheFes/cheapest-energy-hours · GitHub
- @Fizz55 made their first contribution in Fix is_now binary_sensor output for split mode by Fizz55 · Pull Request #117 · TheFes/cheapest-energy-hours · GitHub
Full Changelog: Comparing v5.2.0...v5.3.0 · TheFes/cheapest-energy-hours · GitHub
Update
v5.3.1
BUG FIXES
- The code for the
extreme_now
mode caused an error when the current time was outside the time in scope. This has been fixed
DOCUMENTATION
- EasyEnergy has been added to the providers, and some additional notes have been added to the section about the template sensor needed for EnergyZero and EasyEnergy
- Usage of single and double quotes was not consistant in the documentation.
What’s Changed
- Consistent usage of single/double quotes in examples by @TheFes in Consistent usage of single/double quotes in examples by TheFes · Pull Request #122 · TheFes/cheapest-energy-hours · GitHub
- Add EasyEnergy and some additional notes on the template sensor by @TheFes in Add EasyEnergy and some additional notes on the template sensor by TheFes · Pull Request #123 · TheFes/cheapest-energy-hours · GitHub
- Bugfix for extreme_now by @TheFes in Bugfix for extreme_now by TheFes · Pull Request #124 · TheFes/cheapest-energy-hours · GitHub
Full Changelog: Comparing v5.3.0...v5.3.1 · TheFes/cheapest-energy-hours · GitHub
Thanks for all your work @TheFes !
I configured a template to get the cheapest hours to start the dishwasher in the cheapest hours between 0:00 and 8:00h. My energy provider is Zonneplan.
{{ cheapest_energy_hours(sensor=‘sensor.zonneplan_current_electricity_tariff’, hours=2.7, start=‘0:00’, end=‘08:00’, include_tomorrow=true) }}
The first time I used the template it worked well, but the other day the status is a date and time in the past. Do you have any idea how to fix that?
I think it has something to do with the fact that Zonneplan gives the prices for today and tomorrow in one ‘variable’.
I hope there is a solution for it, because I like the macro a lot!
Your selection now gives the cheapest 2.7 hours from today and the first 8 hours tomorrow. So the total hours number of hours which are checked are 24 + 8 = 32 hours.
It you only want tomorrow, you need to exclude today, so add include_today=false
Do note that you need to use a trigger based template sensor or automation to make sure the datetime is known after midnight (when you actually need it). Otherwise it will start looking for the data of the next day, which won’t be available yet
update:
If you want to create the sensor as a template helper in the GUI, you can do this:
{% set today = now() < today_at('16:00') %}
{% set start = today_at('00:00') + timedelta(days=0 if today else 1) %}
{% set end = today_at('08:00') + timedelta(days=0 if today else 1) %}
{% from 'cheapest_energy_hours.jinja' import cheapest_energy_hours %}
{{ cheapest_energy_hours(sensor='sensor.zonneplan_current_electricity_tariff', hours=2.7, start=start, end=end) }}
This will show the best time for today until 16:00, after that it will show the best time for tomorrow. After 16:00 the prices for tomorrow should be available.
Update
v5.4.4
Sorry for all the releases today, but I had to squash some bugs For completeness I added all the changes in these release notes.
BUG FIXES
- (v5.4.4) fixed rounding of
estimated_costs
whenprecision
parameter was set. - (v5.4.3) fix a pedmas error which would add a second to the start time
- (v5.4.2) the start time returned by the macro was sometimes in the past when
look_ahead
was set totrue
- (v5.4.2)
look_ahead
wasn’t used when a datetime object or datetime string was used as input for thestart
parameter
DOCUMENTATION
- (v5.4.2) added some additional clarification on
look_ahead
in the documentation
What’s Changed
- Fix rounding in estimated cost calcualtion by @TheFes in Fix rounding in estimated cost calcualtion by TheFes · Pull Request #133 · TheFes/cheapest-energy-hours · GitHub
Full Changelog: Comparing v5.4.3...v5.4.4 · TheFes/cheapest-energy-hours · GitHub
Just installed the Jinja macro and Nordpool.
Having issues with testing the template in the Developer Tools menu, using the basic example provided in the documentation but HASS gives:
TemplateNotFound: cheapest_energy_hours.jinja
I’m new to the topic so perhaps I missed something?
Via HACS, Nordpool as well.
Do you have a cheapest_energy_hours.jinja
file in your custom_templates
folder?
Its in the standard HACS Lovelace folder, I thought it was a integration but it installed as lovelace plugin. I couldn’t find anything in the documentation on this.
Should it be somewhere else then?
@ivarv You placed it there yourself?
It should be placed in the custom_templates
folder as explained here
That’s also where HACS will place it if you install it using HACS. Which requires experimental mode to be enabled as explained in the same section linked above.
Did you manage to get it running?
Yes, with the toggle of experimental it works, thanks. Looked over it.