-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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 Tuya integration to new sharing SDK #109155
Merged
Merged
+832
−711
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey there @tuya, @zlinoliver, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
20 tasks
frenck
force-pushed
the
tuya-sharing-sdk
branch
from
January 30, 2024 19:20
2df4c86
to
da28bf9
Compare
8 tasks
MartinHjelmare
requested changes
Jan 30, 2024
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
MartinHjelmare
approved these changes
Jan 31, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking change
Tuya has provided an easier and improved login method for Home Assistant users. Having a developer account with Tuya is no longer required; instead, you can scan a QR code with your Tuya Smart of Smart Life app to authenticate it with Home Assistant.
After the upgrade, Home Assistant will ask you to re-authenticate your Tuya Smart or Smart Life account using this new method.
Proposed change
This PR moves the Tuya integration onto the new sharing SDK, which removes the need for a developer account and can directly log users in by scanning a QR code using the Smart Life or the Tuya app.
This is powered by their new package: https://github.com/tuya/tuya-device-sharing-sdk/
This PR offers a migration path. On upgrade, a re-auth will be triggered that will request the user to log in using their Smart Life / Tuya Smart app. After re-auth, everything will continue to work as usual.
This PR is a combination of the work done in #103007 and #104767, updated to handle our latest features/standards.
Tested against both Tuya Smart and Smart Life accounts, with new integration setups and migrating ones, with a variety of devices (heater, AC, a bunch of bulbs, Christmas lights, doorbell camera, and siren).
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
..coveragerc
.To help with the load of incoming pull requests: