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
Change ZHA Tuya plugs to use quirk IDs #102489
Change ZHA Tuya plugs to use quirk IDs #102489
Conversation
Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
37e14a6
to
9168a28
Compare
PR is rebased now. Diff should be easier to review now and changes are tested on physical devices. EDIT: Quirks bump is made too. PR is ready. |
9168a28
to
40879ad
Compare
EDIT: Do not tag it for 2023.11.x anymore. |
Proposed change
This implements using quirk IDs for configurable Tuya plugs.
The main purpose is to not duplicate manufacturer/model names in both ZHA and zha-quirks.
For example, there are many different versions of the Tuya TS011F plug. Each version requires a (slightly new) quirk.
With this PR, it'll be enough to create a new quirk in zha-quirks with the same quirk ID.
This fixes issues like: #82108 (and others that aren't listed here where plugs don't have a quirk yet, but ZHA still tries to initialize the custom attributes which don't exist).
So this PR is both a bug-fix and an improvement to code quality.
(In the future, more existing "devices" can be switched to using quirk IDs.)
Tested
Tested these changes with a BlitzWolf SHP-13 (
_TZ3000_g5xawfcq
/TS0121
) plug and they seem to be working as expected.The
child_lock
entity isn't created for this plug, as the devices report that it's an "unsupported attribute" upon initialization of the plug (expected/good).(That plug model uses the configuration attributes on the
OnOff
cluster.)Type of change
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
.To help with the load of incoming pull requests: