Add config flow for Tuya#35422
Conversation
Align to master
Align to master
Align to master
Align to master
Align from master
Align from master
Align from master
Align from master
Align from master
Align from master
Align from master
|
Did you format your code with black? |
Yes I did, seem few exception in my last commit. Fixing now... |
Added pylint:disable=unused-import in config_flow.py
|
Thank you for your contribution thus far! 🎖 Since this is a significant contribution, we would appreciate you'd added yourself to the list of code owners for this integration. ❤️ Please, add your GitHub username to the For more information about "code owners", see: Architecture Decision Record 0008: Code owners. |
|
Do you think I should set to deprecated the configuration file option? |
Yes, there doesn't seem anything that is yaml only here. |
- Set config schema "deprecated" - Removed async from update_callback
bdraco
left a comment
There was a problem hiding this comment.
Looks good. I did some basic testing with this. I don't have a tuya account so I could only test the fail paths.
Not so expert here. I changed using also FritzBox implementation as example. |
For the ones that will create a config entry we should mock out Then we can assert that the setup was called. |
- mock out async_setup and async_setup_entry
|
@ollo69 did you get a chance to retest all your devices to make sure everything is still working as expected? |
|
I always check locally that everything is OK before commiting, so I can confirm that last change work properly. |
|
Looks like we just need a docs PR, and this is good to merge |
I'll open doc PR shortly |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please address the comments in a new PR. Thanks!
|
New PR #35497 opened. |
Breaking change
Adding config flow, the Tuya configuration from
configuration.yamlis used only the first time during import phase. In case of credential change it is required to reconfigure the integration, changing credential inconfiguration.yamlis not enought.Al other features are maintened.
Proposed change
This PR is to add config flow to Tuya and so simplify the configuration process of the integration and benefit of all the additional information provided by the devices registry.
Type of change
Example entry for
configuration.yaml:Configuration.yaml entries are not changed and are explained on integration manual page
Additional information
Checklist
black --fast 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..coveragerc.The integration reached or maintains the following Integration Quality Scale: