Setup failed for tado

you can create your own custom component and just point python-tado to the latest release that was put on pypi 11 hours ago.

It worked to get temperature data and change the heating operation. However, when you select “Off”, you get the following errors:
2019-03-17 10:35:48 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1872260016] HTTP Error 422:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py”, line 148, in handle_call_service
connection.context(msg))
File “/usr/local/lib/python3.7/site-packages/homeassistant/core.py”, line 1133, in async_call
self._execute_service(handler, service_call))
File “/usr/local/lib/python3.7/site-packages/homeassistant/core.py”, line 1155, in _execute_service
await handler.func(service_call)
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py”, line 188, in handle_service
self._platforms.values(), func, call, service_name
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py”, line 278, in entity_service_call
future.result() # pop exception if have
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py”, line 292, in _handle_service_platform_call
await getattr(entity, func)(**data)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/tado/climate.py”, line 225, in set_operation_mode
self._control_heating()
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/tado/climate.py”, line 343, in _control_heating
self._store.set_zone_overlay(self.zone_id, CONST_OVERLAY_MANUAL)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/tado/init.py”, line 122, in set_zone_overlay
self.tado.setZoneOverlay(zone_id, mode, temperature, duration)
File “/config/deps/lib/python3.7/site-packages/PyTado/interface.py”, line 287, in setZoneOverlay
data = self._apiCall(cmd, “PUT”, post_data)
File “/config/deps/lib/python3.7/site-packages/PyTado/interface.py”, line 81, in _apiCall
response = self.opener.open(req)
File “/usr/local/lib/python3.7/urllib/request.py”, line 531, in open
response = meth(req, response)
File “/usr/local/lib/python3.7/urllib/request.py”, line 641, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/local/lib/python3.7/urllib/request.py”, line 569, in error
return self._call_chain(*args)
File “/usr/local/lib/python3.7/urllib/request.py”, line 503, in _call_chain
result = func(*args)
File “/usr/local/lib/python3.7/urllib/request.py”, line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 422:

Confirmed working. Until I restart hassio. Than it’s back to my,tado.com again. Any tips?

Same here, I can switch the thermostat on with “manual”, but not off!
I follow the discussion.

Did you try my solution, doesn’t involve editing the container and uses the local dependencies so won’t get overwritten.

More detail here

How did you get it to work on the RPI? I can’t edid any files or something.
Did you just copy a file en put it in the directory?

Well mine is Hassio on intel-nuc but the principle is the same. You load a custom component by placing the files in <config directory>/custom_components/<component name>.

In this directory create a folder tado and copy the official github files from core/homeassistant/components/tado at master · home-assistant/core · GitHub

Now in the __init__.py file change the line that says REQUIREMENTS = ['python-tado==0.2.3'] to be REQUIREMENTS = ['python-tado==0.2.8']. This will force the component to download the required files on restart as the files differ from the built in ones.

Thes files will be in <config directory>/deps/lib/python3.7/site-packages/PyTado/<component files>.

Once these exist after restart you now change original file back to REQUIREMENTS = ['python-tado==0.2.3'] . This downloads the compatable python files to that deps folder. Upon another restart you now have the files in deps where you edit the lines mentioned above. When it is fixed in an official release just remove the tado folder from custom_component to use the normal tado component.

For some reason my Hassio isn’t using the custom tado component but the built in one and therefore isn’t downloading any dependencies…
I copied the __init__.py, climate.py, device_tracker.py and sensor.py from github to /config/custom_components/tado also set persmission to 777 to make sure.
Do I need to call the custom component in the configuration.yaml? I’m just using the normal
tado: username: password:

Did you change the dependency so it forces the download of the deps folder. I assume your custom_components folder as you wrote it is a spelling mistake?

Thanks for your help. It is working perfectly!

1 Like

Found it! I spelled it _init_.py instead of __init__.py
I shouldn’t attempt these things in the middle of the night…haha

Thanks!

1 Like

Same problem here, I can access the sensors but cannot seem to control the thermostats, getting an error 422 whenever I try.

Have completed the custom_component method and then edited lines 115 and 140.

Edit: sorry I should say that I can control the thermostats in manual mode, I just can’t seem to over ride the smart schedule.

https://github.com/home-assistant/home-assistant/pull/22145 already merged. Will be in 0.90

1 Like

So we can expect a stable and out of the box fix soon, right?

Already in the last beta 0.90.0b5, or you can wait two more days for 0.90 release.

2 Likes

does 0.28 work out the box cause in my testing it has different classes causing the heating endpoints to fail, would it be ready in 0.90 as I cant see any updates except the requirements and the auth endpoints.

I have upgraded 0.90.0b5 and tado is still broken.

Same error or different? Can you open an issue in github to track?

Confirmed. Just updated to the latest beta and it has the same issue.