Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setDateTime gives error in home assistant addon #323

Open
gw1urf opened this issue Dec 31, 2024 · 0 comments
Open

setDateTime gives error in home assistant addon #323

gw1urf opened this issue Dec 31, 2024 · 0 comments

Comments

@gw1urf
Copy link

gw1urf commented Dec 31, 2024

After encountering the bug mentioned in issue 318 (inverter seemed to set month number to 13 overnight!) I thought I'd add a home assistant automation to set the date and time nightly, by publishing e.g.:

giv-tcp/control/********/setDateTime = "31/12/2024 11:54:00"

Unfortunately, this fails because write.py's setDateTime function tries to do:

logger.info("Setting inverter time to: "+iDateTime)

where iDateTime is a datetime object. This results in an error about concatenating a string and a datetime object.
The fix would seem to be using str(iDateTime) or similar.

I've been unable to test a fix, though, because I just don't understand docker and Home Assistant well enough. There are so many overlay filesystems lying around and I can't find the base copy of write.py to edit such that the edit survives the addon restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant