palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

With the latest version of HA, Elmo device is not available #91

Closed palazzem closed 10 months ago

palazzem commented 10 months ago

Describe the bug At loading time, there is a crash that prevents e-Connect integration from being loaded.

Error message

This is an extract of users' logs:

Loggers: homeassistant.config_entries
Source: custom_components/econnect_alarm/init.py:46
Integration: E-connect Alarm
First Occurred: 9:44:03 PM (2 occurrences)
Last logged: 9:44:04 PM

Error setting up entry E-connect Alarm for econnect_alarm
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 388, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/econnect_alarm/init.py”, line 46, in async_setup_entry
await hass.async_add_executor_job(
File “/usr/local/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/elmo/devices.py”, line 49, in connect
self.update()
File “/usr/local/lib/python3.11/site-packages/elmo/devices.py”, line 76, in update
inputs_alerted, inputs_wait, lastInput = self._connection.query(q.INPUTS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/elmo/api/decorators.py”, line 22, in func_wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/elmo/api/client.py”, line 398, in query
“name”: descriptions[query][entry[“Index”]],
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
Key Error: 20

Expected behavior The integration should load properly regardless of HA version.

Additional context None.

To Reproduce Update HA to version 2023.8.3 and run the configuration from scratch.

Environment

palazzem commented 10 months ago

Logging PR has been merged here: https://github.com/palazzem/econnect-python/pull/99

A custom build is on the way.