-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Support for TadoX thermostatic radiator valves #129600
Conversation
Co-authored-by: Karl Beecken <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Hey there @chiefdragon, @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @karlbeecken
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Co-signed-by: Moritz Schmidt <[email protected]>
It says changes are requested by the bot, but I do not understand what the bot wants to be changed. Both contributors have signed the CLA, is anything else missing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the effort in bringing in TadoX! I have a few remarks and questions left.
It seems... Nothing. No worries, it can be overruled once a Core Member did the review. |
That would be much appreciated! I have a new branch working on it. Your contribution to get TadoX in would really help me, whereas I don't have TadoX, yet. |
Anything that can be done still to be able to include this in the .12 release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added a lot of complexity with the if tado.is_x
statements. Can you please check if it's possible to create two classes for it?
Some changes like identifying if the device is a TadoX should go directly in the library
if self._tado.is_x and self._tado_geofence_data["presence"] == "HOME": | ||
return PRESET_HOME | ||
if self._tado.is_x and self._tado_geofence_data["presence"] == "AWAY": | ||
return PRESET_AWAY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self._tado.is_x and self._tado_geofence_data["presence"] == "HOME": | |
return PRESET_HOME | |
if self._tado.is_x and self._tado_geofence_data["presence"] == "AWAY": | |
return PRESET_AWAY | |
if self._tado.is_x: | |
if self._tado_geofence_data["presence"] == "HOME": | |
return PRESET_HOME | |
if self._tado_geofence_data["presence"] == "AWAY": | |
return PRESET_AWAY |
sw_version=device_info["currentFwVersion"], | ||
model=device_info["deviceType"], | ||
via_device=( | ||
DOMAIN, | ||
device_info["serialNo"], | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To deduplicate code please create local variables for these attributes and have a single DeviceInfo
cool_max_temp: float | None = None | ||
cool_step: float | None = None | ||
|
||
if tado.is_x: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having a lot of these if statements, can we have separate classes for it?
self.is_x = self.tado.http.isX | ||
[device.update(is_x=self.is_x) for device in self.devices] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is strange...
Why can't the library identify if the device is a TadoX or not??? I recommend to extend the library to add support to identify if a device is a TadoX one instead of doing here this hacky workaround
Also, you are creating a list here, which is never to be used...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library identifies if the device is a TadoX. The isX
attribute comes from it.
The smell here is the leak of that http
object. HA shouldn't be aware of the libraries internals.
@@ -221,6 +240,8 @@ def update_home(self): | |||
|
|||
def get_capabilities(self, zone_id): | |||
"""Return the capabilities of the devices.""" | |||
if self.is_x: | |||
return {"type": TYPE_HEATING} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the library not provide this information for the TadoX too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is because the Tado X API does not return any comparable capabilities. The endpoint that did this in the old API is not existing anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as above. get_capabilities
is an Endpoint of the Tado pre-X devices.
The library should abstract this implementation detail away, so the HA integration wouldn't have to know about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that there is a complete rewrite being done by @erwindouna at the time anyway, so from our point of view it isn't really a good use of time to make everything "beautiful" in the old library. This here is intended as a rather quick fix so users can get their Tado X working with the beginning of the heating season in the northern hemisphere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've decided that I'll hereby close this PR and not to pursue completion any further. I've always wondered why it seems to be more popular to contribute via HACS rather than contributing to core directly, but now I think I understand. I can understand all the feedback in the reviews and for the most part I agree with it. It's not beautiful code, it's not a nice solution, but it still works, and it would have been a sufficient temporary fix. Perhaps I should have made it clearer and earlier that it was intended as a temporary fix to get Tado X working as the heating season has already started in most parts of the Northern Hemisphere. My problem is that at first it seems like everything is okay, the PR is close to merging and added to the beta milestone. Then the PR is drafted again with no realistic timeframe remaining to fix the issues in time to get it out in 2024.12. Those Reviews could have been written weeks earlier with enough time remaining to get things done. Furthermore, it's not really transparent to newbies like me how the release cycle works, when cutoff dates are etc. A good solution will have to come with the rewrite of the upstream tado library (for which I have already started implementing Tado X support). I'm really sorry for everyone waiting patiently for Tado X support (you can still add the changes in this PR as a custom component). I still want to help to get this working, but I'll have to reconsider if it's really worth the time and hassle. Anyway it'll probably take some time. |
@Moritz-Schmidt - whilst I'm not affiliated with HA bar being a user and paying my subscription to NabuCasa, I'd like to thank you for doing what you've done so far on this PR. I understand the frustrations you've gone through as I've gone through them myself, and it's rare to get at least a sense of "why bother?" at times, so I'd like to chip in and offer you my thanks for the work you've done integrating this so far, and I look forward to a resolution if and when there is one as I'm about to purchase said Tado system myself. |
Thanks @Moritz-Schmidt and @karlbeecken for your contributions. I hope we can find a way to update the integration soon. And don't loose faith in contributing to HA. For us non-developers we can only offer support in testing, and your contributions are invaluable to make HA as great as it is. In the meanwhile I'm pretty sure that an updated version of the Node Red Tado node will be released soon (0.12) that will have basic TadoX support. Hopefully that will get us through the winter :) |
@Moritz-Schmidt At first, let me say, that I can understand your position. It can get frustrating at times, working on a large project with so many moving parts and people. I experienced it with my first PR, which I then recommended being reverted, because of some issues in HA core. I especially understand your frustration with "turbulent" communication. I don't understand why @frenck added the But: I have to say, I find some of your statements unjustified. Keep in mind, that you are submitting code, that gets installed in hundred of thousands of homes and which has access to critical things like heating. This PR adds yourself to the CODEOWNERS file (767af19), with a commit message that is:
I assume that you meant this differently than you expressed it. (I can understand frustration with long dev cycles) |
It's sad to see this PR being closed prematurely. We were so close! @Moritz-Schmidt Thanks for your tireless contributions! With this PR being closed, it's time to look ahead and plan a more permanent solution. Altough @edenhaus is making big steps, the timeline for Tado X being supported will probably be pushed back substantially. With this temporary solution being pulled, it might be nice looking ahead at that timeline. |
@MrEbbinghaus thanks for your reply. I may have been too emotional and impolite earlier, I apologise for that.
That's correct, my problem is not with the disagreements in terms of content, but primarily with the turbulent communication. I don't expect anyone to have the same opinion as me. On the contrary – a project like this thrives on discussion and mutual feedback.
I'm sorry, this was impolite of me, I should have at least made it a separate commit. I was following the development checklist and didn't give it a second thought which I should have done. However, it was my intention to also take responsibility for the code I submitted.
No of course I don't expect volunteers to do that. But I expect to have somewhat of a clear timeline, especially when it comes from people who are presumed to be Nabu Casa employees. |
I think the best way would be to get tadoasnyc ready for use in the Tado integration and implement Tado X Support in a way that is not as hacky as in the old library. After the upstream library is ready the Integration has to be updated to use the new Library and the Tado X devices. As I've wrote earlier I've already started implementing Tado X in the tadoasync library and will probably continue my work there. I think any help on tadoasync will be appreciated, right @erwindouna ? |
I've added all the files as a custom component, but i still get handed the built in integration when trying to add it Edit: NVM figured it out, the manifest was missing a version, added one and now it's working |
Can you share how you did this? I could not get this to work yet... |
Do you already have the files in custom components? |
For anyone waiting for Tado X Support: Threre are 2 Ways to get Tado X working right now 1. Custom Integration:
OR 2. via Matter and Thread Doing both does not really make sense since you would have them twice in Home Assistant. |
Can you share the manifest.json for your custom integration? Just having the version there is apparently not enough :) |
|
Hi and thanks for the hard work! @maxcerny I copied your conf and custom integration overrides default as expected, but I'm getting "Config flow could not be loaded: {"message":"Invalid handler specified"}" Does anyone else experience this? Much appreciated |
Strange, I didn't get that error on 3 separate HA installations. One thing I did have on all of them was the base integration was already set up. Maybe try removing the custom component, set up the core tado integration, then add the custom component back. |
thanks @maxcerny for your quick answer and help Did that, could reconfigure cloud access, but now the integration won't load Logger: homeassistant.setup Setup failed for custom integration 'tado': No setup or config entry setup function defined. |
Then I'm sorry, I can't help you. :( Those the steps I took, and it all worked for me. |
thank you, will stick to matter for now :) |
Proposed change
Add support for TadoX thermostatic radiator valves (TRV) which has some API changes to the old Tado V3.
This doesn't change any functionality for Tado V3 systems.
This PR will only add support for the TadoX radiator valve, it may work with the Smart Thermostat X and the Wireless Temperature Sensor X but not tested, will probably not work with Heat Pump Optimizer X.
This also changes the PyTado dependency from 0.17.6 to 0.17.7Library version bump is in PR #129842 which has to be merged firstSince – with the heating season having started already – people are waiting for the support for TadoX it would be nice to get this released this Month.
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: