Tado stopped working after upgrade. "Failed to login to tado" - access_token

Hi,
I upgraded some days ago to the 2022.4.2 version, updated the credentials and now tado can not login anymore “Failed to login to tado”. I printed out the catched exception and it only says “access_token” so maybe the old access token got cached? I double checked the credentials and printed them out on runtime and used the also printed login link. Everything worked fine with the link but the error still appears.

So maybe someone can point me to the right direction like cleaning temp, cached files etc.
Thank you in advance!

Best regards
Julian

1 Like

Are you configuring Tado though the GUI or are you editing the yaml config only? I think the Yaml part is only for presence, not for the climate and sensors.

I added

device_tracker:
  - platform: tado
    username: YOUR_USERNAME
    password: YOUR_PASSWORD
    home_id: YOUR_HOME_ID

with my credentials to the config. For the upgrade I had something like

tado
 ...

in my config but got the error message that I have to delete it since its deprecated. Now it looks like
image

As you can see, the credentials are now under a device tracker. I do not know if you can reset the GUI credentials any other way then removing the Tado integration and adding it again.

Dit you click the link “Prüfe die protokolle”?

“Prüfe die Protokolle” only shows

So when I remove it and add it again, I have to configure the credentials via gui? And I also have to re add all my automations?

So I will check after work if there exists a way I can change those data manually first.

As far as I remember it asked for permissions when I added it a few months ago.

And what do the buttons in that dialog do? “Loschen” is probably erase the log, but it could also mean erase the credentials I suppose?

If you delete the integration, the automations are broken but not removed. If you add the integration again with the same entity id’s the automations should work again. But is is a pain, and there should be a better way to reauthorize I think, but I do not know if that is possible now.

Ah ok, thank you! I will start investigating now :slight_smile:

What I do not understand is from the logs

2022-04-19 19:33:16 ERROR (MainThread) [homeassistant.components.tado] Failed to login to tado: 'access_token'
2022-04-19 19:34:00 DEBUG (MainThread) [homeassistant.components.tado.device_tracker] Requesting Tado
2022-04-19 19:34:00 DEBUG (MainThread) [homeassistant.components.tado.device_tracker] Tado presence query successful, 2 device(s) at home
2022-04-19 19:34:36 DEBUG (MainThread) [homeassistant.components.tado.device_tracker] Requesting Tado
2022-04-19 19:34:37 DEBUG (MainThread) [homeassistant.components.tado.device_tracker] Tado presence query successful, 2 device(s) at home

So the config stuff works but not the setup stuff? Do they use different credentials or do they fetch and cache the access token and use them for oauth?

https://github.com/home-assistant/core/blob/b7c1fbc842ef362672a32c762c5bfb5cb84326ab/homeassistant/components/tado/__init__.py

Uses different credentials as

https://github.com/home-assistant/core/blob/b7c1fbc842ef362672a32c762c5bfb5cb84326ab/homeassistant/components/tado/device_tracker.py

now I am searching where home assistant persists the credentials from gui

Ok, in config/.storage/core.config_entries is an entry like

{
                "entry_id": "SOME_ID",
                "version": 1,
                "domain": "tado",
                "title": "Tado Entry Name",
                "data": {
                    "username": "EMAIL",
                    "password": "PASSWORD",
                    "fallback": true
                },
                "options": {
                    "fallback": "TADO_DEFAULT"
                },
                "pref_disable_new_entities": false,
                "pref_disable_polling": false,
                "source": "import",
                "unique_id": "UNIQUE_ID",
                "disabled_by": null
            }

Just stop HA, change credentials and save. Start HA again and it should work. Would be great if this will be changeable in HA gui.

4 Likes