Skip to content

Add Tuya TS130F variant _TZ3210_jrhczaaa - #5270

Open
clementlamoureux wants to merge 1 commit into
zigpy:devfrom
clementlamoureux:_TZ3210_jrhczaaa
Open

Add Tuya TS130F variant _TZ3210_jrhczaaa#5270
clementlamoureux wants to merge 1 commit into
zigpy:devfrom
clementlamoureux:_TZ3210_jrhczaaa

Conversation

@clementlamoureux

Copy link
Copy Markdown

Proposed change

Adds a new quirk TuyaTS130FIdentifyMCUGP for a TS130F curtain/roller-shutter module variant (seen on _TZ3210_jrhczaaa) whose Zigbee signature is not covered by any of the existing TS130F quirks in zhaquirks/tuya/ts130f.py.

This variant reports, on endpoint 1:


device_type=0x0202 (WINDOW_COVERING_DEVICE)
in_clusters=[0x0000, 0x0003, 0x0004, 0x0005, 0x0006, 0x0102, 0xEF00]
out_clusters=[0x000A, 0x0019]

plus the usual Green Power proxy endpoint 242.

Compared to the closest existing quirk (TuyaTS130GP), this signature additionally exposes the Identify cluster (0x0003) and the Tuya MCU cluster (0xEF00), so it fell through without a matching quirk and the covers entity behaved incorrectly (inverted position).

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

Copilot AI lite review requested due to automatic review settings August 20, 2026 14:03
@codecov

codecov Bot commented Aug 20, 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 (50e5073).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #5270   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files         424      424           
  Lines       14667    14670    +3     
=======================================
+ Hits        13582    13585    +3     
  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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new legacy (v1) quirk in zhaquirks/tuya/ts130f.py to match a TS130F curtain/roller-shutter variant that exposes Identify (0x0003), Tuya MCU/manufacturer cluster (0xEF00), and Green Power endpoint 242, ensuring the device uses the custom covering cluster behavior (notably inverted position handling).

Changes:

  • Refactors Tuya imports in ts130f.py to include TUYA_CLUSTER_ID.
  • Adds TuyaTS130FIdentifyMCUGP with a signature matching Identify + Tuya MCU cluster + GP endpoint 242.
  • Defines a replacement cluster set for endpoint 1 using TuyaWithBacklightOnOffCluster and TuyaCoveringCluster.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread zhaquirks/tuya/ts130f.py
Comment on lines +728 to +732
Groups.cluster_id,
Scenes.cluster_id,
TuyaWithBacklightOnOffCluster,
TuyaCoveringCluster,
],
@zigpy-review-bot zigpy-review-bot changed the title Added support for TS130F variant _TZ3210_jrhczaaa as TuyaTS130FIdenti… Add Tuya TS130F variant _TZ3210_jrhczaaa Aug 20, 2026
@zigpy-review-bot zigpy-review-bot added bot: nearly ready PR is good but needs a few minor tweaks 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 new quirk Adds support for a new device Tuya Request/PR regarding a Tuya device bot: new variant PR only adds a new device model/variant to an existing quirk per LLM labels Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: nearly ready PR is good but needs a few minor tweaks per LLM bot: new variant PR only adds a new device model/variant to an existing quirk 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 new quirk Adds support for a new device Tuya Request/PR regarding a Tuya device

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants