TAKeanice
(Tassilo Karge)
November 13, 2025, 10:37pm
1
I just set up my first Tuya Wifi device and experienced some difficulties during the initial setup of the OpenHAB core Tuya Binding, mainly due to being too impatient to read the instructions, but in any case they are tedious.
On a HomeAssistant forum I read that they switched to a new setup method two years ago, which allows for just scanning a QR code and skips the need for a developer account at Tuya:
dev ← tuya-sharing-sdk
opened 07:10PM - 30 Jan 24 UTC
## Breaking change
Tuya has provided an easier and improved login method fo… r 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
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [x] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/31153
## Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
To help with the load of incoming pull requests:
- [x] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
(The forum entry which led me to this was Tuya Issue - Switch works in Smart Life App but shows offline at https://iot.tuya.com/ - Home Assistant Community )
Now I wonder whether that method has any drawbacks compared to the “old” one that OpenHAB uses, or whether implementing it could be worth a try. Has anyone already checked that out or any idea or opinion on that topic?