I was just thinking, can it help to remove the integration and then add it again and log in again with the integration?
Hi everyone,
I patched Erwins OAuth branch with the Tado X support, it is available here: ha-core/homeassistant/components/tado at tado-oauth-deviceflow ¡ karlbeecken/ha-core ¡ GitHub (download via Download GitHub directory).
This will work on local installations as soon as soon as this upstream PR in PyTado is merged and released: Fix devices request in Tado X by karlbeecken ¡ Pull Request #183 ¡ wmalgadey/PyTado ¡ GitHub. That also means, I couldnât test it on my local HA installation yet, only in the development environment, where it seems to work fine (with both Tado X and V3 installations, even at the same time).
Donât forget to append a version (e.g. "version": "1.0.0"
) to the end of the manifest.json
when installing as an alternate to the core integration shipped with HA, like discussed earlier in the thread.
I really hope this helps for now, we will continue working on the rewrite of python-tado, but I canât make any promises yet unfortunately. Thanks for your patience!
Couldnât this be combined with the following?
Sorry, what do you mean by that? The patched version is the combination of the updated auth flow (due to the depreciation of the password flow) and the changes needed for tado X. If you mean combining the pull request for the new auth into core with the changes for X, that will not be possible, as the core team is very strict and doesnât allow such âhackedâ solutions. Thatâs why we need to rewrite the base library first, only then we can make the update in the core integration. (For example, right now for the X version we rely on accessing private variables from the library in HA, which is really not a thing that could be accepted into core).
Hi Karl, thank for your efforts! Do I understand it correctly that after Erwins OAuth patch gets released through a HA update, this custom component should work again? I updated the custom component, but by itself it didnt work yet.
Hi Arnold, no, this is uncoupled from Erwinâs patch. I used it as the base for the Tado X changes (basically I manually rebased the existing Tado X patch onto the new OAuth flow), so if you have updated the custom component, you already have Erwinâs patches.
But I found a bug in the base library that leads Tado X API calls to fail. Until that is fixed upstream (see the linked PR), the new Tado X patch doesnât work yet.
So, basically you now have to wait for the PR to be merged and released, and if all goes well, you only need to restart your HA once and it should work.
oh thank you for the explanation, so wait for the merge of the PR.
I have everything ready so far, luckily the heating season is no longer so urgent for us, so the non-functioning automation is not so fatal.
should the script used here also work with a PR of your branch, right?
If I were to create a PR to the core repo, the script should work, yes
Sorry if I donât understand. I have my Tado x connected with this hacs but now I canât connect anymore. Did I have to vait to next HA update 2025.4 and everything will be okay again
You need to 1) update the custom component with the one mentioned above: Tado integration - Add Support for tado X devices - #82 by dmho and 2) wait for the PR in the python-tado library to be merged.
Thank you so much. And the PR vil fusionere in 2025.4 rightđ
No, the PR is completely unrelated to Home Assistant releases, so there is no need to wait for 2025.4, and it could also happen (while I donât hope so) that it takes longer than 2025.4 being released. Fix devices request in Tado X by karlbeecken ¡ Pull Request #183 ¡ wmalgadey/PyTado ¡ GitHub
Would you give a update here when the fix for Tado x is working
Sure, the PR is merged and you can try now to install the fix. I still have some issues, but I suspect there might be something wrong with my installationâso I would be very glad about some feedback from other users.
Did you download the folder linked above to your custom_integrations folder, set a version in manifest.json and restart HA? What is the content of your manifest.json?
Tried on my beta instance where I did not have TAdo before, no luck. Infinite spinner while loading the Tado integration config screen.
manifest.json
{
"domain": "tado",
"name": "Tado",
"codeowners": ["@erwindouna"],
"config_flow": true,
"dhcp": [
{
"hostname": "tado*"
}
],
"documentation": "https://www.home-assistant.io/integrations/tado",
"homekit": {
"models": ["tado", "AC02"]
},
"iot_class": "cloud_polling",
"loggers": ["PyTado"],
"requirements": ["python-tado==0.18.10"],
"version":"v1.0.0"
}
Wil try now on my production box that already had the Tado integration
Hi Karl, thanx for the patch. Mith me, I am stil not able to get it working. I put your files in the custom_integrations/tado folder. And this is my manifest file:
{
"domain": "tado",
"name": "Tado",
"codeowners": ["@erwindouna"],
"config_flow": true,
"dhcp": [
{
"hostname": "tado*"
}
],
"documentation": "https://www.home-assistant.io/integrations/tado",
"homekit": {
"models": ["tado", "AC02"]
},
"iot_class": "cloud_polling",
"loggers": ["PyTado"],
"requirements": [
"python-tado==0.18.10"
],
"version": 2025.4
}
I see in the integration that it got loaded:
However when coosing âAdd Entryâ the screen shows Tado and a spinnen that doesnât go away.
In the logs I see:
Error while waiting for device activation
Traceback (most recent call last):
File "/config/custom_components/tado/config_flow.py", line 85, in _wait_for_login
await self.hass.async_add_executor_job(self.tado.device_activation)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/PyTado/interface/interface.py", line 99, in device_activation
self._http.device_activation()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/PyTado/http.py", line 554, in device_activation
if self._check_device_activation():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/PyTado/http.py", line 518, in _check_device_activation
raise TadoException("User took too long to enter key")
PyTado.exceptions.TadoException: User took too long to enter key
And another:
Error handling request from 192.168.1.1
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, 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 32, 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 225, 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 340, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 387, 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 490, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tado/config_flow.py", line 114, in async_step_user
"url": tado_device_url,
^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'tado_device_url' where it is not associated with a value