-
-
Notifications
You must be signed in to change notification settings - Fork 36.6k
Migrate tado to tadoasync #121503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate tado to tadoasync #121503
Conversation
|
Hey there @chiefdragon, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
@EtienneSOU, would you be willing to test out this PR? You're an owner of an air conditioning and it would be great to see if this newly added library handles the AC well. |
|
Yes, I'll check it but I will be out of my home for a week. |
This isn't true since the current connector doesn't await the library methods. The new library has coroutine functions as methods that need to be awaited. |
|
From what I've checked on Python Tado Async I'll have to rework the fan levels, vertical swings and horizontal swings to make it work with the new bindings. If we merge it now, all AC users will loose fan and swing modes we've just added. |
It won't be merged any time soon. I need to refactor some more stuff to make the newly added library operational. I'll ping you when I tested it further on my end (meaning the DeviceTracker and Thermostat what I can do). :) |
|
I'd recommend following PEP8 for naming conventions in the new library. Particularly look at the package name and the attribute names of the models. For package names underscore should be avoided and for attribute names they should be lowercase snake_case. https://peps.python.org/pep-0008/#naming-conventions If the keys in the JSON are named following camelCase convention you can use field aliases in mashumaro to convert to snake_case in the model attribute names. https://github.com/Fatal1ty/mashumaro?tab=readme-ov-file#field-aliases |
Done and done. |
|
@erwindouna Hey as we discussed I cloned your fork and triggered the setup flow using my own tado account. I will try to add a workaround for this can continue testing the actual functionality |
|
Problem happens because of the Hot Water zone, it is not compatible with the library dataclass definition. Returned json item for the hot water zone is: enabled attribute in the dazzleMode attribute is missing |
|
Messed up a rebase. Redoing this in a new PR. |
Breaking change
Proposed change
Migrate Tado to use Python Tado Async. This is an asynchronous library, aligned with Tado developers to implement a more robust and stable library, dedicated for HA. It gives direct control within the HA community and no third-party library is used anymore.
This is compatible with the current
TadoConnectorthat handles all interaction within HA. Python Tado HA has the same method names to be 100% compatible in the current state (reducing any further refactoring in the integration at this moment).This is a big draft: users with devices I don't have (AC's, WaterHeater) need to gathered to test their devices.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: