Skip to content
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

Tuya v2 integration New Update #53510

Merged
merged 60 commits into from
Sep 7, 2021
Merged

Tuya v2 integration New Update #53510

merged 60 commits into from
Sep 7, 2021

Conversation

zlinoliver
Copy link
Contributor

@zlinoliver zlinoliver commented Jul 26, 2021

Breaking change

Tuya Smart always strive to provide the best development experience possible and keep updating our Home Assistant integration capabilities. Since the old version of Tuya Home Assistant integration supports limited categories and control commands, now we bring you our new integration with extended support for more categories and commands.

Our new integration is built on Tuya’s standard Open APIs and tackles the limits of categories and accessible control commands. We deliver more development-friendly features including virtual device debugging, official authorization, and technical supports, which will help you efficiently work on development with the Tuya ecosystem.

The existing Tuya Integration is no longer maintained by Tuya officially, and will be deprecated. The estimated deprecation date is 2021.12.31. The new integration will be officially maintained by the Tuya Developer Team, for more information of the migration, please check this documentation How to Migrate the Tuya Home Assistant Integration from the Old Version

Users must login again to use the updated Tuya integration.

Proposed change

As we discussed with Paulus previously, it's the minimum viable integration that allows it to be configured via a config flow. Include a small integration to make sure it all works.

  • Supported Device Category

  • Support Scene feature

  • Support new device pairing status refresh

  • Support Tuya smart home cloud project type

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)
  • 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:
  1. Fixed the issue where contact sensors cannot be added. #14, #37
  2. Fixed the issues where some color lights cannot be turned on. #42
  3. Fixed the issues where some humidifiers cannot work correctly. #36
  4. Support current, power, voltage on some device, like socket, power strip and switch #17
  5. Support vacuum #9
  6. Support Thermostat #7
  7. Support Pet Water Feeder #23
  8. Fix AC shows incorrect temperature #15
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @ollo69, mind taking a look at this pull request as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@zlinoliver zlinoliver mentioned this pull request Jul 26, 2021
21 tasks
homeassistant/components/tuya/base.py Outdated Show resolved Hide resolved
homeassistant/components/tuya/light.py Outdated Show resolved Hide resolved
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please limit the initial PR to a single platform, following:

https://developers.home-assistant.io/docs/creating_component_code_review/#5-make-your-pull-request-as-small-as-possible

A PR this size cannot be reviewed correctly.

project_type = ProjectType(user_input[CONF_PROJECT_TYPE])
api = TuyaOpenAPI(
user_input[CONF_ENDPOINT]
if project_type == ProjectType.INDUSTY_SOLUTIONS
Copy link
Member

@MartinHjelmare MartinHjelmare Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to bump the library version where the typo in ProjectType.INDUSTY_SOLUTIONS is addressed in a separate new PR after this PR is merged?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have recorded this

@MartinHjelmare
Copy link
Member

Besides the comments above, please check the CI build errors and address those too.

Almost ready now. 👍

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A final comment above and then this is good to go. 👍

@zlinoliver
Copy link
Contributor Author

Nice! A final comment above and then this is good to go. 👍

Done, thanks for the comment, please help to review and merge the PR.

@MartinHjelmare
Copy link
Member

Thanks!

@MartinHjelmare MartinHjelmare merged commit e6e7793 into home-assistant:tuya-v2 Sep 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants