MizterB / homeassistant-infinitude-beyond

Home Assistant custom component for controlling Carrier Infinity Touch thermostats through an Infinitude proxy server.
17 stars 3 forks source link

Both this integration and the original are failing with with date value out of range #20

Open alexkerin opened 2 months ago

alexkerin commented 2 months ago

With the latest Home Assistant version 2024.7.2 (or maybe the one before) my original infinitude integration stopped working (after a good few years of working well). Seeing this new integration I updated my infinitude server. HACS install went fine, but 'Add Integration" fails after 10 seconds or so with "Unknown Error". The infinitude server is running, can be accessed by a browser, and Home Assistant can ping it.

The log has :

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.config_flow Source: custom_components/infinitude_beyond/config_flow.py:64 integration: Infinitude Beyond (documentation) First occurred: 9:20:43 PM (3 occurrences) Last logged: 9:24:12 PM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/infinitude_beyond/config_flow.py", line 64, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/infinitude_beyond/config_flow.py", line 43, in validate_input await infinitude.connect() File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 199, in connect self.zones[zone_id]._update_activities() File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 526, in _update_activities dt = datetime( ^^^^^^^^^ OverflowError: date value out of range

as well as

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.config_flow Source: custom_components/infinitude_beyond/config_flow.py:64 integration: Infinitude Beyond (documentation) First occurred: 9:21:00 PM (1 occurrences) Last logged: 9:21:00 PM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/infinitude_beyond/config_flow.py", line 64, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/infinitude_beyond/config_flow.py", line 43, in validate_input await infinitude.connect() File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 174, in connect status, config, energy, profile = await asyncio.gather( ^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 152, in _fetch_config data = resp.get("data", {}) ^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get'

The original integration is also failing with

Logger: homeassistant.components.climate Source: helpers/entity_platform.py:364 integration: Climate (documentation, issues) First occurred: 9:13:55 PM (1 occurrences) Last logged: 9:13:55 PM

Error while setting up infinitude platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/infinitude/climate.py", line 122, in setup_platform devices.append(InfinitudeZone(infinitude, zones[i]["id"], zone_name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/infinitude/climate.py", line 216, in init self.update() File "/config/custom_components/infinitude/climate.py", line 371, in update dt = datetime.datetime( ^^^^^^^^^^^^^^^^^^ OverflowError: date value out of range

MizterB commented 2 months ago

This is likely because you don't have a schedule defined for one of the available activities. I will handle this in the next release, and provide additional logging.

alexkerin commented 2 months ago

@MizterB Yep thank you. I deleted schedules a while back as I only use manual and didn't realize I had knocked it off Home Assistant (maybe when I rebooted). I added a schedule for 12am Sunday for home, away, wake, and sleep, rebooted, and it's back. Appreciate your work on the new integration.

MizterB commented 1 month ago

@alexkerin If you are willing to delete your temporary schedule, please re-test in 2024.8.0