asev / homeassistant-uponor

Uponor Smatrix Pulse heating/cooling system integration for Home Assistant.
MIT License
44 stars 20 forks source link

New version (0.9.0) tries to parse "output" #47

Closed arrelid closed 4 months ago

arrelid commented 5 months ago

Version 0.9.0, published the other day, has introduced a new error on my end. I get this on startup, as well as on reload of the integration:

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 15:31:01 (1 occurrences)
Last logged: 15:31:01

Error setting up entry Uponor for uponor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/uponor/__init__.py", line 47, in async_setup_entry
    await state_proxy.async_update()
  File "/config/custom_components/uponor/__init__.py", line 287, in async_update
    self._data = await self._hass.async_add_executor_job(lambda: self._client.get_data())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/uponor/__init__.py", line 287, in <lambda>
    self._data = await self._hass.async_add_executor_job(lambda: self._client.get_data())
                                                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/UponorJnap/UponorJnap.py", line 14, in get_data
    for var in data['output']['vars']:
               ~~~~^^^^^^^^^^
KeyError: 'output'
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:941
First occurred: 12:11:02 (12 occurrences)
Last logged: 15:03:02

Update for switch.uponor_away fails
Update for switch.uponor_cooling_mode fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1289, in async_device_update
    await self.async_update()
  File "/config/custom_components/uponor/switch.py", line 48, in async_update
    await self._state_proxy.async_update()
  File "/config/custom_components/uponor/__init__.py", line 287, in async_update
    self._data = await self._hass.async_add_executor_job(lambda: self._client.get_data())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/uponor/__init__.py", line 287, in <lambda>
    self._data = await self._hass.async_add_executor_job(lambda: self._client.get_data())
                                                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/UponorJnap/UponorJnap.py", line 14, in get_data
    for var in data['output']['vars']:
               ~~~~^^^^^^^^^^
KeyError: 'output'
dave-code-ruiz commented 4 months ago

For thanks for collaboration:

Buy Me A Coffee