ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
549 stars 54 forks source link

Unhandled exception in callback function for event_key: Events.PAIRED #162

Closed oywino closed 1 year ago

oywino commented 1 year ago

Describe the bug

Logger: home_connect_async.callback_registery Source: custom_components/home_connect_alt/binary_sensor.py:52 Integration: Home Connect Alt (documentation, issues) First occurred: 8:00:10 PM (2 occurrences) Last logged: 8:00:13 PM

Unhandled exception in callback function for event_key: Events.PAIRED Traceback (most recent call last): File "/usr/local/lib/python3.10/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 52, in add_appliance if setting.type == "Boolean" or isinstance(setting.value, bool) or conf.get_entity_setting(option.key, "type") == "Boolean": UnboundLocalError: local variable 'option' referenced before assignment

Version of the custom_component

v0.5.10 ## Configuration configuration.yaml Add your configuration here. home_connect_alt: client_id: 301C08ED8D8A494B5FCEC88B0B749DE37A4823324462D195E82xxxxxxxxxxx client_secret: 0B39561B9F8DD3346FCAAE16D115CAFBE9AA433E99CB62F29045xxxxxxxxxxxx name_template: $brand $appliance - $name ## Debug log

Paste the exception info here

Unhandled exception in callback function for event_key: Events.PAIRED
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/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 52, in add_appliance
    if setting.type == "Boolean" or isinstance(setting.value, bool) or conf.get_entity_setting(option.key, "type") == "Boolean":
UnboundLocalError: local variable 'option' referenced before assignment