ekutner/home-connect-hass

home_connect_async.callback_registery

Closed this issue · 1 comments

I have 2 error message in my log

Logger: home_connect_async.callback_registery
Källa: /usr/local/lib/python3.12/site-packages/home_connect_async/callback_registery.py:162
Inträffade först: 11:20:46 (4 händelser)
Senast loggade: 11:20:46
Unhandled exception in callback function for event_key: Events.CONNECTION_CHANGED
Unhandled exception in callback function for event_key: Events.DATA_CHANGED
Unhandled exception in callback function for event_key: BSH.Common.Status.RemoteControlActive
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/home_connect_async/callback_registery.py", line 140, in _async_call
await callback(appliance, event_key, value)
File "/config/custom_components/home_connect_alt/select.py", line 281, in async_on_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1113, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1050, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 151, in state
current_option = self.current_option
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/home_connect_alt/select.py", line 269, in current_option
return self._appliance.settings[self._key].value
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'BSH.Common.Setting.PowerState'

and number 2

Logger: home_connect_async.callback_registery
Källa: /usr/local/lib/python3.12/site-packages/home_connect_async/callback_registery.py:162
Inträffade först: 11:20:46 (2 händelser)
Senast loggade: 11:20:46
Unhandled exception in callback function for event_key: Events.DATA_CHANGED
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/home_connect_async/callback_registery.py", line 156, in _async_call
callback(appliance)
File "/config/custom_components/home_connect_alt/binary_sensor.py", line 33, in add_appliance
if isinstance(option.value, bool) or conf.get_entity_setting(option.key, "type") == "Boolean":
^^^^
UnboundLocalError: cannot access local variable 'conf' where it is not associated with a value

I can't verify but both issues should be fixed in 1.1.6