TheFes / cheapest-energy-hours

Jinja macro to find the cheapest energy prices
GNU General Public License v3.0
64 stars 6 forks source link

Include a deviation from the lowest price #111

Closed rrooggiieerr closed 7 months ago

rrooggiieerr commented 7 months ago

Ok, this one relates to my other issue #110, but it's different so I'll create a new issue.

Consider a situation where there are a couple of hours with low prices which are, in price, very close to each other.

For instance tonight I've got a price of € 0,155, € 0,154, € 0,154, € 0,154, € 0,154 and € 0,155 from 00:00 till 06:00. There's only a price difference of € 0.001.

It would be nice to be able to give a deviation from the lowest price to include prices which vary very little from the lowest price in the equation. For instance include a parameter allowed_deviation=0.01 to allow a deviation of 1 cents from the lowest price

Wouldn't that be neat?

TheFes commented 7 months ago

I'll have a look at this as well. Thanks for the suggestion.