-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Adds Tado Child Lock support #135837
base: dev
Are you sure you want to change the base?
Adds Tado Child Lock support #135837
Conversation
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.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey, this is my first contribution and I'm not yet warm with all the requirements. The core functionality should be implemented, but there might be cases that I'm not aware of. Also, if I have some more time, I will look into testing and docs. If anyone is interested in helping out or advising, feel free :) |
Thanks for submitting your first PR! The Tado Connector is currently under a revamp, to be upgraded to a Data Update Coordinator: #134175. This PR is also completed. This will heavily impact the main structure of communicating with Tado. How have you tested the child lock (other than going a version in the upstream)? Since this isn't released yet in the current PyTado library. I have recently added this particular code myself in the PyTado library. 😄 |
@erwindouna Thanks for your feedback. I had no other way than using the upstream^^ |
@erwindouna Maybe this PR could assist you in that it already adds a |
It's great to see other people also wanting to contribute! If you'd like I can keep this open and once PyTado and DUC are ready, you want to integrate the child lock? :) |
I looked into the DUC PR and I think the changes are a very welcome alteration in how Tado data is kept stored. If you want, you can add it yourself. If this PR helps you, you can leave it open for reference, although I think you're perfectly capable of implementing it much better :D. I can help though if needed, as I am interested in that feature being added. Will leave the decision up to you. Thanks for enhancing the integration! |
@erwindouna happy to report that with 0.18.6 I have now adapted the switch to DUC and everything is working smoothly! |
Documentation update for PR home-assistant/core#135837
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.
Great additions, thanks @proohit! I have left the first initial comments. Also, please update the test cases, so that the child lock is also tested.
@erwindouna Added all the requested changes. I'm not fully satisfied with the tests, because I wanted to patch the updated state gotten from patch("homeassistant.components.tado.PyTado.interface.api.Tado.get_device_info",
return_value={"shortSerialNo": "WR4", "childLockEnabled": True},
) but both had the same result. Only thing I tested now is if the child lock api endpoint is called with the correct boolean. |
Also I think by updating some fixtures, I broke some snapshot tests. Do you know how to update them? |
By using |
Proposed change
This PR adds support for tado child lock (https://support.tado.com/en/articles/4849684-what-is-child-lock).
Also bumps python-tado to 0.18.6 which introduced this feature api wise (https://github.com/wmalgadey/PyTado/releases/tag/0.18.6).
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: