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
Error Setting up platform - time zone offset not present #13
Comments
I had this same issue and after tons of code changes and other troubleshooting the time was off on the thermostat. |
+2. This fixed my issue. |
If anyone is willing to share their localTime strings here, that would be helpful in debugging. I obviously don't have this problem. It can be found at http://<infinitude_server>:3000/api/status. Right now, mine is "2019-07-28T12:44:39-05:01" (US EDT) |
@MizterB here is what the API returns, along with the actual time. It looks like no offset is needed if the unit is configured to the local timezone and the adjust for daylight savings is enabled.
Actual time (returned from my mac): |
Same for me: |
Fixed in release 0.7 |
I'm having a problem with the climate.py script.
It doesnt seem to be pulling the localTime correctly, here is the error message
File "/config/custom_components/infinitude/climate.py", line 193, in update "%Y-%m-%dT%H:%M:%S") # Strip the TZ offset, since this is already in local time File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime (data_string, format)) ValueError: time data '2019-06-02T14' does not match format '%Y-%m-%dT%H:%M:%S'
When I go to the infinitude page i can see localTime does not have a timezone offset.
localTime | 2019-06-02T15:19:08
So I removed the string slice on line 193 and updated to this and it seemed to do the trick.
original
dt = datetime.datetime.strptime(getSafe(self._systemStatus, "localTime")[:-6], "%Y-%m-%dT%H:%M:%S") # Strip the TZ offset, since this is already in local time
updated
dt = datetime.datetime.strptime(getSafe(self._systemStatus, "localTime"), "%Y-%m-%dT%H:%M:%S") # Strip the TZ offset, since this is already in local time
The text was updated successfully, but these errors were encountered: