core icon indicating copy to clipboard operation
core copied to clipboard

TADO integration stopped working - Failed to unload

Open jeroen7103 opened this issue 1 year ago • 17 comments

The problem

When I restart HA the integration works for a few minutes. After that, all entities from the integration become unavailable. On the Integrations page of HA, the Tado integrations shows "Failed to unload".

What version of Home Assistant Core has the issue?

core-2024.8.3

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_2024-08-27T12-52-33.820Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

KeyError: 'tado'
2024-08-25 19:15:14.956 ERROR (MainThread) [homeassistant.components.shelly] Error connecting to Shelly device shellyplusi4-80646fe218d4, error: DeviceConnectionError(DeviceConnectionError(ClientConnectorError(ConnectionKey(host='192.168.10.13', port=80, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=1432999572988732864), OSError(113, "Connect call failed ('192.168.10.13', 80)"))))
2024-08-25 19:15:15.403 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Woonkamer for tado
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 154, in async_unload_entry
    hass.data[DOMAIN][entry.entry_id][UPDATE_TRACK]()

Additional information

No response

jeroen7103 avatar Aug 27 '24 12:08 jeroen7103

Hey there @chiefdragon, @erwindouna, mind taking a look at this issue as it has been labeled with an integration (tado) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tado can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tado Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tado documentation tado source (message by IssueLinks)

home-assistant[bot] avatar Aug 27 '24 12:08 home-assistant[bot]

I have the same problem since I updated to version 2024.8. The problem occurs after reloading the Tado integration and disappears after a restart

image

Bamboooo67 avatar Aug 29 '24 16:08 Bamboooo67

Having the same issue - barely works a day. Wondering what causes this. However I do have an automation that reloads the tado integration in case it becomes unavailable. It doesn't fix the issue, checking if there is a casual connection.

ryebreadsalad avatar Sep 01 '24 16:09 ryebreadsalad

Having the same issue - barely works a day. Wondering what causes this. However I do have an automation that reloads the tado integration in case it becomes unavailable. It doesn't fix the issue, checking if there is a casual connection.

Unfortunately this does not work for me. I get the error:

Error: The config entry 'XXX' (tado) with entry_id 'XXX' cannot be unloaded because it is in the non recoverable state ConfigEntryState.FAILED_UNLOAD

jeroen7103 avatar Sep 01 '24 18:09 jeroen7103

Having the same issue - barely works a day. Wondering what causes this. However I do have an automation that reloads the tado integration in case it becomes unavailable. It doesn't fix the issue, checking if there is a casual connection.

Unfortunately this does not work for me. I get the error:

Error: The config entry 'XXX' (tado) with entry_id 'XXX' cannot be unloaded because it is in the non recoverable state ConfigEntryState.FAILED_UNLOAD

To be clear, this does not work to relieve the issue this bug is about. This was working for the "normal issue" when cloud based integrations become unresponsive due to internet/Server issues or something. I was just mentioning this cause Bambooo67 said it's happening after config reload, which my automation does automatically upon detecting unavailability of the integration.

ryebreadsalad avatar Sep 01 '24 18:09 ryebreadsalad

I have updated HA Core to version 2024.9.0. The TADO integration is working again :-)

jeroen7103 avatar Sep 05 '24 05:09 jeroen7103

I can confirm that it seems to be working again in 2024.9.0, but it's not been 24 hours yet, so this is not a definitive conclusion.

Also, I haven't seen anything in the release notes that suggests a fix for this issue, except for 2 items that mention Tado (a better config validation for legagy-setup integrations, and an AC fan speed fix).

c-kick avatar Sep 05 '24 08:09 c-kick

Same result here... look ok for now.

DarkAllMan avatar Sep 05 '24 09:09 DarkAllMan

Very nice, we hope for the best, thanks for the information

Bamboooo67 avatar Sep 05 '24 13:09 Bamboooo67

At about an hour ago, my tado climate entries became unresponsive again. As I already feared; the issue persists.

c-kick avatar Sep 05 '24 13:09 c-kick

For me all is still online... But I will report back if the same happens.

DarkAllMan avatar Sep 05 '24 14:09 DarkAllMan

its 100% still an issue. I have a rest command I use to restart the integration, and its still consistently fails with this error:-

`Logger: homeassistant.config_entries Source: config_entries.py:819 First occurred: 09:37:50 (1 occurrences) Last logged: 09:37:50

Error unloading entry Our house for tado Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/tado/init.py", line 154, in async_unload_entry hass.data[DOMAIN][entry.entry_id]UPDATE_TRACK ~~~~~~~~~^^^^^^^^ KeyError: 'tado'`

rofo69 avatar Sep 09 '24 08:09 rofo69

I confirm the issue after upgrading to 2024.9.1 :-(

grebar avatar Sep 09 '24 18:09 grebar

I confirm the issue in ver 2024.9.1.

grebar avatar Sep 09 '24 18:09 grebar

I am having the same issue... and when it works it 'connects', 'disconnects' and 'reconnects' again. When trying to set a new temperature it will 'crash' and 'disconnect'

Quotes, as it is a state based on the overall health of the integration, I see the same error in my logs as the OP.

xNUTx avatar Sep 13 '24 07:09 xNUTx

Ingaven the same issue. Integration is not working anymore with version 2024.9.2

gcraenen avatar Sep 19 '24 10:09 gcraenen

https://github.com/home-assistant/core/blob/28ece89272c48695d550110b661c03ab4755bbc4/homeassistant/components/tado/init.py#L152 this line is to blame. It needs to be config_entry instead of entry in de async_unload_platforms.

fairbanksbs avatar Sep 19 '24 13:09 fairbanksbs

Why isn't this issue being picked up? It's clearly affecting over 10.000 active Home Assistant installations to the point of non-functioning climate control, with the autumn/winter season fast approaching in the northern hemisphere.

c-kick avatar Sep 23 '24 07:09 c-kick

I am noticing one thing: 1 (exactly 1) of my devices still accepts input from the integration, the other devices simply return to the settings from Tado after changing them.

xNUTx avatar Sep 25 '24 06:09 xNUTx

I think this removed setting hass.data[DOMAIN] and it should be replaced with entry.runtime_data here: https://github.com/home-assistant/core/blob/28ece89272c48695d550110b661c03ab4755bbc4/homeassistant/components/tado/init.py#L154

eifinger avatar Sep 27 '24 07:09 eifinger

I think this removed setting hass.data[DOMAIN] and it should be replaced with entry.runtime_data here:

https://github.com/home-assistant/core/blob/28ece89272c48695d550110b661c03ab4755bbc4/homeassistant/components/tado/init.py#L154

This doesn't answer the question why it is unloading at all.

eifinger avatar Sep 27 '24 07:09 eifinger

This will land in beta b3, so if anyone wants to test the changes out we can check if there is more to it or that this fixes it

joostlek avatar Sep 27 '24 12:09 joostlek

This will land in beta b3, so if anyone wants to test the changes out we can check if there is more to it or that this fixes it

I have installed beta ~2024.10.1b6~ 2024.10.0b7 in a test environment and it still has this issue getting stuck trying to reload it... did I do something wrong or am I just tripping?

fairbanksbs avatar Oct 01 '24 13:10 fairbanksbs

Nevermind, I was tripping it seems, or it had somehow cached the not beta result and was still showing this.

But I still have the issue of only having 1 operable heater control, the others jump back to 'auto' and reset the temperature setting chosen.

fairbanksbs avatar Oct 01 '24 13:10 fairbanksbs

Ok, version 2024.10.0 fixes the reload issue, but I can still only modify one device, the others simply ignore the input I give them until I manually change the HVAC mode and it all resets to the values in Tado.

I have removed all traces of the Tado integration and restarted adding the heating system to no avail, I even tried to rebuild my house in the Tado environment and redid everything. The current integration is mostly broken for me at this point, with just the normal heating control on exactly 1 device, and only that one.

xNUTx avatar Oct 03 '24 08:10 xNUTx

This issue seems to covered thanks to @joostlek. I'll put focus on the newly reported issue of @xNUTx.

erwindouna avatar Oct 03 '24 19:10 erwindouna