epaulsen / energytariff

HACS Integration for monitoring Norwegian grid tariff level
MIT License
28 stars 1 forks source link

Use local time instead of UTC #5

Closed epaulsen closed 1 year ago

epaulsen commented 1 year ago

Three peak hours are at current stored using UTC time, this might lead to issues for calculating top three as consumption might end up on the wrong date. It will also cause issues with monthly reset, as consumption in the last hours might be reported on next month, depending on the timezone of the HA installation.

Use local time helper from homeassistant.utils to convert UTC timestamp to local time.

crackers81 commented 1 year ago

Nice :)