Skip to content

Tado - Cannot add integration, keeps on asking to re-authenticate #145032

Description

@ramonv

The problem

Click on 'add integration'
Install Tado integration.

Following the authentication flow.
Succesfull authentication
Return to Home Assistant
See succesfull "Create configuration for Home,"

See a quickly disappearing error: "Failed setup, will retry: 'shortSerialNo"
Tado asks to reauthenticate again, error shown is: "Failed to set up: Device login flow status is PENDING. Starting re-authentication"

It now shows two 'areas' called Home. One is failed and shows a reconfigure button. See screenshot.

When clicking on 'reconfigure' of the first area, error received is: "Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble"
When clicking on 'configure' on the second area and following the reauthentication flow and succesfully authenticating, the error and the need for reauthentication starts again.

After deleting the home areas and re-adding the integration problem persists.

Image

What version of Home Assistant Core has the issue?

core-2025.5.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tado

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tado

Diagnostics information

home-assistant_tado_2025-05-16T10-29-25.320Z.log

Example YAML snippet

Anything in the logs that might be useful for us?

2025-05-16 12:11:13.646 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.1.39
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 510, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 41, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 226, in get
    return await super().get(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 107, in get
    result = await self._flow_mgr.async_configure(flow_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 336, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 383, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        flow, cur_step["step_id"], user_input
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 487, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tado/config_flow.py", line 111, in async_step_user
    "url": tado_device_url,
           ^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'tado_device_url' where it is not associated with a value
2025-05-16 12:11:16.621 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=23 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=23, family=2, type=2, proto=0, laddr=('0.0.0.0', 43280)>
2025-05-16 12:11:46.622 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=23 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=23, family=2, type=2, proto=0, laddr=('0.0.0.0', 43280)>
2025-05-16 12:11:52.685 ERROR (MainThread) [homeassistant.components.tado.coordinator] Unexpected error fetching tado data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tado/coordinator.py", line 101, in _async_update_data
    devices = await self._async_update_devices()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tado/coordinator.py", line 137, in _async_update_devices
    return await self.hass.async_add_executor_job(self._update_device_info, devices)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tado/coordinator.py", line 143, in _update_device_info
    device_short_serial_no = device["shortSerialNo"]
                             ~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'shortSerialNo'
2025-05-16 12:11:58.301 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Thuis' for tado integration could not authenticate: Device login flow status is PENDING. Starting re-authentication.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions