yaleman / pvoutput

PVOutput.org python API module
https://yaleman.github.io/pvoutput/
MIT License
9 stars 5 forks source link

ValueError: minute must be in 0..59 #53

Closed bugwhine closed 4 years ago

bugwhine commented 4 years ago

File "/home/pi/.local/lib/python3.7/site-packages/pvoutput/init.py", line 133, in addstatus data["t"] = time(hour=hour, minute=minute).strftime("%H:%M") ValueError: minute must be in 0..59

If using datetime.now() the rounding here can round up to 60 minutes, which isn't desireable -> minute = int( self.stats_period

yaleman commented 4 years ago

I believe this is fixed in https://github.com/yaleman/pvoutput/commit/24d3b7182e88bbae6d9077ce6b1950cd3c4c4f8d, and I've uploaded v0.0.5 to pypi