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

Odd errors whenever adjusting settings using Home Assistant #27

Closed cbrollin closed 1 week ago

cbrollin commented 1 week ago

Whenever I adjust the temperature or change a setting in Home Assistant (using the thermostat card or in the integration), I get this odd error which pops up. I have Infinitude set up in a docker running on the same machine as Home Assistant, and am using the Infinitude Beyond integration through HACS.

Example from changing the preset.

"Failed to perform the action climate/set_preset_mode. Unexpected character: line 1 column 1 (char 0)"

After a few seconds I see the command go through, and the UI updates with the desired setting, but the error shows up anytime I adjust a climate setting.

This is what I see in the log

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 951, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/infinitude_beyond/climate.py", line 170, in async_set_temperature
    await self.zone.set_temperature(temperature=temperature)
  File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 857, in set_temperature
    await self.set_hold_mode(mode=HoldMode.UNTIL, activity=Activity.MANUAL)
  File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 814, in set_hold_mode
    await self._infinitude._post(endpoint, data)
  File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post
    resp_json: dict = await resp.json(content_type=None)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json
    return await super().json(*args, loads=loads, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1216, in json
    return loads(stripped.decode(encoding))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads
    return orjson.loads(__obj)  # type:ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0)

Any ideas?

MizterB commented 1 week ago

Rebuild the Infinitude container. You are running an old version.

mrcushing commented 1 week ago

Yup, rebuild infinitude - solved the problem immediately for me.