CharlesGillanders / alphaess-openAPI

This Python library uses the Alpha ESS Open API to retrieve data on your Alpha ESS inverter, photovoltaic panels, and battery if you have one.
MIT License
9 stars 5 forks source link

Temp fix to the wrong date being passed through into getOneDateEnergyBySn() #2

Closed Poshy163 closed 10 months ago

Poshy163 commented 11 months ago

No idea why this is the case; by adjusting the time.strftime to be ran within the function, rather than parsed into it. i got 2 different dates, with the latter being correct.

As seen here

[Mon, 27 Nov 2023 00:41:46] DEBUG [alphaess.py.getOneDateEnergyBySn:93] DATE: 2023-11-26
[Mon, 27 Nov 2023 00:41:46] DEBUG [alphaess.py.getOneDateEnergyBySn:95] DATE: 2023-11-27

I got no idea why this is the case, but its a fix for now and should report the local date to the API call

Poshy163 commented 10 months ago

Would be nice to get a pull soon @CharlesGillanders, this fixes the issue, for some reason the parsed date is UTC. so this will do for now