mshanemc / homebridge-griddy

Apache License 2.0
2 stars 1 forks source link

limit % switch to this day's pricing #1

Closed mshanemc closed 4 years ago

mshanemc commented 4 years ago

example: it's 2p, and we've already got DAM pricing through tomorrow, which is going to be much higher than today.

Current price is 3c, today's high is 4c

But tomorrow's high is 7c

Current: it flips the high switch off too soon (percentage is calculated out of 7 instead of out of 4).

Change: calculate the high from the forecast, stopping at end of current day.