jpulakka / nordpool_diff

Transforms electricity spot price into thermostat control signal. Home Assistant custom component.
MIT License
63 stars 7 forks source link

What happens if there is not enough prices? #14

Closed flippz closed 1 year ago

flippz commented 1 year ago

If i set it to 20 and there is only 15 ahead prices... What happens then? btw this seems good although i hardly understand it. btw2 i did not know where to wright this

jpulakka commented 1 year ago

The worst case is in the afternoon. When tomorrow prices aren't yet available, we might have just 10 next hours.

When that happens, nordpool_diff pads using the last available price, so that we get the needed amount of prices before performing calculations on them. In practice that works reasonably.