Skip to content

Add Tuya Zemismart ZM25EL cover motor _TZE200_68nvbio9#4817

Open
petruknw wants to merge 5 commits intozigpy:devfrom
petruknw:add-tuya-zm25el-cover
Open

Add Tuya Zemismart ZM25EL cover motor _TZE200_68nvbio9#4817
petruknw wants to merge 5 commits intozigpy:devfrom
petruknw:add-tuya-zm25el-cover

Conversation

@petruknw
Copy link
Copy Markdown

@petruknw petruknw commented Mar 9, 2026

Overview

This PR adds a Tuya v2 TuyaQuirkBuilder‐based cover quirk for the Zemismart ZM25EL battery blind motor (_TZE200_68nvbio9 / TS0601).

The implementation follows the new TuyaWindowCovering + .tuya_cover() pattern introduced in PR #4779 and is based on the DP mapping used in the Zigbee2MQTT external converter for this device.

Device

  • Brand: Zemismart / Tuya
  • Model: ZM25EL (labelled as TS0601)
  • Manufacturer: _TZE200_68nvbio9

Features exposed

Standard ZHA cover entity with:

  • Open / close / stop
  • Lift position with slider (0–100)

Configuration entities:

  • Motor direction select (DP5: forward / back)
  • Click up / Click down buttons (DP20) for single‐step positioning
  • Set upper / lower limit, Delete upper / lower limit, Delete all limits buttons (DP16) for border calibration

Diagnostic entities:

  • Battery percentage (DP13)
  • Motor fault binary sensor (DP12)

Datapoint mapping

The quirk uses the following Tuya DPs, matching the Z2M converter:

DP Purpose Values
1 State 0=open, 1=stop, 2=close
2 Current position 0–100 (0=closed, 100=open → inverted)
3 Target position 0–100 (same inversion)
5 Motor direction 0=forward, 1=back
12 Motor fault true/false
13 Battery 0–100
16 Border/limits up, down, up_delete, down_delete, remove_top_bottom
20 Click control up, down

Implementation details

  • Uses TuyaWindowCovering and .tuya_cover() for core cover behaviour (open/close/stop and position)
  • Uses tuya_dp_attribute + write_attr_button on TUYA_CLUSTER_ID for border calibration and click control, consistent with _TZE284_3mzb0sdz
  • Exposes motor_fault as a diagnostic binary sensor with PROBLEM device class
  • No custom device class required; follows the v2 builder pattern

Testing

Environment: Home Assistant 2026.3, ZHA with zhaquirks 1.0.x

Verified:

  • ✅ Open/close/stop and position slider behave as expected
  • ✅ Reverse direction select flips direction correctly
  • ✅ All calibration buttons (set/delete upper/lower, delete all) perform documented actions
  • ✅ Click up/down move blind in small steps
  • ✅ Motor fault sensor stays OK during normal operation (no error floods)

Closes #3118

Peter and others added 2 commits March 9, 2026 23:11
Adds native WindowCovering support via TuyaWindowCovering, exposes
reverse direction, calibration (border) buttons, click control and
motor fault / battery diagnostics.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.66%. Comparing base (20a0777) to head (7e63ead).
⚠️ Report is 38 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4817   +/-   ##
=======================================
  Coverage   92.66%   92.66%           
=======================================
  Files         380      380           
  Lines       12766    12773    +7     
=======================================
+ Hits        11829    11836    +7     
  Misses        937      937           

☔ View full report in Codecov by Sentry.
📢 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.

@petruknw petruknw marked this pull request as ready for review March 9, 2026 13:18
@TheJulianJES TheJulianJES added Tuya Request/PR regarding a Tuya device smash This PR is close to be merged soon labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smash This PR is close to be merged soon Tuya Request/PR regarding a Tuya device

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Device Support Request] custom quirk for Tuya Zemismart blind cover motor TS0601 _TZE200_68nvbio9 with battery

2 participants