home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.04k stars 31.07k forks source link

Tado configuration error #130274

Open dezito opened 2 weeks ago

dezito commented 2 weeks ago

The problem

I have the new Tado X devices and get a configuration error when the integration starts up

What version of Home Assistant Core has the issue?

core-2024.12.0.dev202411090225

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tado

Link to integration documentation on our website

No response

Diagnostics information

2024-11-10 09:56:08.770 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Hjem for tado

Traceback (most recent call last):

  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context

    result = await component.async_setup_entry(hass, self)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 84, in async_setup_entry

    await hass.async_add_executor_job(tadoconnector.update)

  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run

    result = self.fn(*self.args, **self.kwargs)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 184, in wrapper

    result = method(*args, **kwargs)

             ^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/src/homeassistant/homeassistant/components/tado/tado_connector.py", line 79, in update

    self.update_devices()

  File "/usr/src/homeassistant/homeassistant/components/tado/tado_connector.py", line 142, in update_devices

    device_short_serial_no = device["shortSerialNo"]

                             ~~~~~~^^^^^^^^^^^^^^^^^

KeyError: 'shortSerialNo'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

dezito commented 2 weeks ago

I inserted a _LOGGER.info(device) in the code to see the variable, this is the output: {'serialNumber': 'SU4097XXXXXX', 'type': 'SU04', 'firmwareVersion': '240.2', 'connection': {'state': 'CONNECTED'}, 'batteryState': 'NORMAL', 'temperatureAsMeasured': 21.34, 'temperatureOffset': 0.5}

Moritz-Schmidt commented 2 weeks ago

Tado X is currently not supported until #129600 is merged.

Since I only have the TRVs (Type: SU04) I don't know if your wireless thermometer (SU04) will be supported with the changes in the PR. I think it should work since the thermometer “replaces” the integrated Thermometer in the TRV in the Tado logic, and it should have the same API methods and responses.