Skip to content

Convert TS011F plug v2 to QuirkBuilder - #5247

Open
sroeper wants to merge 1 commit into
zigpy:devfrom
sroeper:ts011f-v2-quirk
Open

Convert TS011F plug v2 to QuirkBuilder#5247
sroeper wants to merge 1 commit into
zigpy:devfrom
sroeper:ts011f-v2-quirk

Conversation

@sroeper

@sroeper sroeper commented Aug 12, 2026

Copy link
Copy Markdown

Proposed change

Convert the existing TS011F plug v2 quirk for _TZ3000_5f43h46b and
_TZ3000_okaz9tjs from the legacy device definition to QuirkBuilder.

The existing Tuya cluster replacements and configuration entities are
preserved:

  • child lock
  • power-on state
  • backlight mode

A unit test was added to verify that the QuirkBuilder definition is
registered for both supported manufacturers and exposes the expected
configuration entities.

Additional information

This is a migration of the existing quirk to QuirkBuilder and is intended
to preserve the existing behavior. No changes to the device functionality
are intended.

The following checks pass:

  • python -m pytest -q tests/test_tuya_ts011f_plug.py — 2 passed
  • ruff
  • ruff format
  • mypy
  • codespell
  • git diff --check

Device diagnostics

Not applicable. This PR converts an existing quirk to QuirkBuilder and
does not add support for a new device.

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.60%. Comparing base (b139f81) to head (ff86624).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #5247   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files         424      424           
  Lines       14667    14662    -5     
=======================================
- Hits        13582    13578    -4     
+ Misses       1085     1084    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zigpy-review-bot zigpy-review-bot added bot: needs changes PR needs changes per LLM bot: 2.0 migration done PR is on the ZHA/quirks 2.0.0 API (migrated or written for 2.0) per LLM code quality Improvement to code quality Tuya Request/PR regarding a Tuya device bot: small PR PR is small per LLM bot: needs maintainer PR does something questionable that needs a maintainer decision per LLM labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: needs changes PR needs changes per LLM bot: needs maintainer PR does something questionable that needs a maintainer decision per LLM bot: small PR PR is small per LLM bot: 2.0 migration done PR is on the ZHA/quirks 2.0.0 API (migrated or written for 2.0) per LLM code quality Improvement to code quality Tuya Request/PR regarding a Tuya device

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants