ekutner / home-connect-hass

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

Thermador Range - Unhandled exception in stream event handler #245

Closed daveblank closed 9 months ago

daveblank commented 10 months ago

Describe the bug

After initial install, Thermador Range isn't adding and there is a traceback. After enabling debug logs, looks like the integration is able to talk to the home connect service, since I'm getting some data back from my oven:

2023-09-05 08:09:28.256 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='STATUS', message='STATUS', data='{"haId":"THERMADOR-PRD366WHU-68A40E87ED3D-001","items":[{"handling":"none","key":"Cooking.Oven.Status.CurrentCavityTemperature","level":"hint","timestamp":1693926568,"unit":"°F","uri":"/api/homeappliances/THERMADOR-PRD366WHU-68A40E87ED3D-001/status/Cooking.Oven.Status.CurrentCavityTemperature","value":66}]}', origin='https://api.home-connect.com', last_event_id='THERMADOR-PRD366WHU-[removed]-001')

Version of the custom_component

0.6.3

Configuration

home_connect_alt:
  client_id: [removed]
  client_secret: [removed]
Add your configuration here.

logger:
  default: warn
  logs:
    home_connect_async: debug
    home_connect_alt: debug
    custom_components.home_connect_alt: debug

Debug log

2023-09-05 08:09:33.827 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='STATUS', message='STATUS', data='{"haId":"THERMADOR-PRD366WHU-68A40E87ED3D-001","items":[{"handling":"none","key":"Cooking.Oven.Status.CurrentCavityTemperature","level":"hint","timestamp":1693926573,"unit":"°F","uri":"/api/homeappliances/THERMADOR-[removed]-68A40E87ED3D-001/status/Cooking.Oven.Status.CurrentCavityTemperature","value":63}]}', origin='https://api.home-connect.com', last_event_id='THERMADOR-PRD366WHU-[removed]-001')
2023-09-05 08:09:33.827 DEBUG (MainThread) [home_connect_async.homeconnect] Unhandled exception in stream event handler
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/home_connect_async/homeconnect.py", line 256, in async_events_stream
    await self._async_process_updates(event)
  File "/usr/local/lib/python3.11/site-packages/home_connect_async/homeconnect.py", line 342, in _async_process_updates
    await appliance.async_update_data(item)
  File "/usr/local/lib/python3.11/site-packages/home_connect_async/appliance.py", line 494, in async_update_data
    if key in self.status:
       ^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
daveblank commented 10 months ago

For what it's worth, the official integration doesn't work either - but I do get some data from my oven reported back: https://community.home-assistant.io/t/need-help-with-home-connect-integration/610666

ekutner commented 10 months ago

If this problem is still happening then please add log_mode: 7 to the home_connect_alt section of your configuration.yaml and upload a complete log file