If you like Tuya Smart Life (Beta) Integration, please give it a star or fork it and contribute!
The Smart Life(Beta)integration is developed for controlling Powered by Tuya (PBT) devices using the tuya-device-sharing-sdk, and maintained by the official Tuya Developer Team.
It is currently in beta testing, and there is still room for improvement in terms of functionality and stability. Feel free to install and try it out.
We really appreciate your contributions and awesome ideas to this project. We are happy to hear your voices at GitHub Discussions to make our integration better.
Please provide feedback to Tuya through Github Issues to help us improve and optimize it.
-
Tuya Integration relies on Tuya IoT Core Service subscription, if the subscription has expired, the integration will stop working. Users are required to manually extend the trial subscription period, which can be inconvenient and frustrating.
-
Tuya Smart Life (Beta) integration has removed the Tuya cloud development workflow, allowing users to simply scan and log in using the Smart Life app, and then seamlessly sync their IoT devices directly to Home Assistant. It offers a simplified and efficient solution.
Note: If you are transitioning from the Tuya Integration to the Smart Life (Beta) integration, it may be necessary to set up all your devices again within your Smart Life app account. The migration process does not support directly transferring devices from one integration to the other.
How to Install Smart Life Integration (Beta)
Your devices need to first be added in the Smart Life app.
Seven primary categories, 50 secondary categories are supported now!
When developers find that a certain functionality is not supported in Smartlife, developers can develop that support following these steps:
Download the diagnostic file and review the category and supported standard instruction set data of the device.
data["category"]
: Device categorydata["function"]
anddata["status_range"]
: Standard instruction set's Data type and Value descriptiondata["status"]
: Value of the standard instruction set- See the Standard Instruction Set Document available in the Home Assistant Entity Development Guide for more details.
Smartlife supports 16 entity code files: Code file address
alarm_control_panel.py
binary_sensor.py
button.py
camera.py
climate.py
cover.py
fan.py
humidifier.py
light.py
number.py
scene.py
select.py
sensor.py
siren.py
switch.py
vacuum.py
Add the entity's support in the relevant file(s) as per the Standard Instruction Set in the Home Assistant Entity Development Guide. If the existing files don't suffice, you can add new entity files to accommodate new entity types.
Finally, ensure that the modifications are tested locally before submitting your PR.
As an example, you may need to add numeric display functionality for the standard instruction "cur_current" under the "dlq" category in sensor.py
. Locate the "dlq" category in the SENSORS dictionary (add it if not already present), and implement support for the standard instruction "cur_current".
Code Linking
-
Fork the project: Developers first need to fork the
dev
branch of our project smartlife on GitHub to their own accounts. -
Start development: On the newly forked branch, developers make modifications and further developments to category and standard instruction sets.
-
Commit changes: After the development is accomplished, developers need to commit their changes to their GitHub repositories.
-
Create a Pull Request: Developers then need to create a Pull Request in their GitHub repository, requesting their modifications to be merged into your
dev
branch. -
Review the Pull Request: The submitted Pull Requests need to be reviewed.
-
Testing: The internal staff regularly carry out tests.
-
Merge to
main
: If the tests on thedev
branch show no issues, then the changes are merged into themain
branch. -
Release a new version: On the
main
branch, release a new version for users.
Follow us to get more information and leading technology on the Internet of Things, as well as updates and activities on the Tuya IoT Developer Platform
You can give feedback on issues you encounter for the project via GitHub Issue.
For more information, please refer to the LICENSE file.