Skip to content

Support switch mode on TS004F - #5285

Open
elupus wants to merge 2 commits into
zigpy:devfrom
elupus:tuya/smart_knob_simpler
Open

Support switch mode on TS004F#5285
elupus wants to merge 2 commits into
zigpy:devfrom
elupus:tuya/smart_knob_simpler

Conversation

@elupus

@elupus elupus commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Adjust TS004F to expose the switch type as an entity in home assistant.

  1. Restore the OnOff cluster on input/server side, where this attribute lives. These devices correctly report the other attributes as unsupported and the zha diagnostics should be updated to indicate unsupported on on_off attribute.
  2. Add a platform entity for this switch

This is a much simplified version of the pre-steps in #4537.

Additional information

Device diagnostics

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 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.60%. Comparing base (6a3822c) to head (59895bf).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #5285   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files         424      424           
  Lines       14667    14680   +13     
=======================================
+ Hits        13582    13595   +13     
  Misses       1085     1085           

☔ 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.

@elupus elupus changed the title Simplified version of smart knob changes Support switch mode on TS004F Aug 27, 2026
@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 enhancement Improve an existing quirk Tuya Request/PR regarding a Tuya device bot: needs maintainer PR does something questionable that needs a maintainer decision per LLM labels Aug 31, 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: 2.0 migration done PR is on the ZHA/quirks 2.0.0 API (migrated or written for 2.0) per LLM enhancement Improve an existing quirk Tuya Request/PR regarding a Tuya device

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants