jpulakka / nordpool_diff

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

Daylight saving time #2

Closed jpulakka closed 1 year ago

jpulakka commented 2 years ago

DST is probably not handled correctly right now. We just read "today" and "tomorrow" attributes (which are typically 24-element lists) from nordpool, and assume that there are 24 hours in day and thus dt.now().hour gives index to current hour in "today" list. Too many assumptions there. Possibly there will be 25 elements in the list when moving from summer to winter, and 23 elements in the opposite case.

If EU gets rid of DST then this issue goes away without changing anything. Need to see to prioritize.

jpulakka commented 2 years ago

Both winter and summer times work correctly, but the transition does not. Minor bug.

jpulakka commented 1 year ago

This works correctly with entso-e / v0.2.0. Won't fix nordpool (which is off by 1 hour two days in year, that's all).