Skip to content

Add Quoya M515EGBZTN support and fix curtain_motor position inversion#1406

Open
ErnieV wants to merge 1 commit into
JohanBendz:SDK3from
ErnieV:feature/quoya-m515egbztn-support
Open

Add Quoya M515EGBZTN support and fix curtain_motor position inversion#1406
ErnieV wants to merge 1 commit into
JohanBendz:SDK3from
ErnieV:feature/quoya-m515egbztn-support

Conversation

@ErnieV

@ErnieV ErnieV commented May 29, 2026

Copy link
Copy Markdown

Summary

Adds support for the Quoya M515EGBZTN Zigbee roller blind / plissé motor and fixes two existing issues in the curtain_motor driver.

Tested on Homey Pro (Early 2023), firmware 13.2.1-rc.4, with two M515EGBZTN devices running simultaneously.

Closes #1405


Changes

New fingerprints

  • _TZE200_gubdgai2 — Quoya M515EGBZTN
  • _TZE200_vdiuwbkq — Quoya M515EGBZTN (alternate)

Bug fix: position inversion in setPosition

The device uses 0 = fully open, 100 = fully closed, opposite to Homey's windowcoverings_set (0 = closed, 1 = open). updatePosition already handles this correctly with 100 - value, but setPosition was not inverting — so setting the slider to 0% sent 0 to the device, which opened the blinds instead of closing them.

// before
pos = reverse ? 1 - pos : pos;

// after
pos = reverse ? pos : 1 - pos;

This bug likely affects other TS0601 curtain motors with the same 0=open convention.

Upper/lower limit support (DP 16)

Exposes the device's physical end-stop programming via DP 16 (border):

Enum Action
0 Set upper limit at current position
1 Set lower limit at current position
4 Remove both limits
  • Three flow action cards added via driver.flow.compose.json
  • Three checkbox settings added to the device settings screen as a direct alternative to flow cards (Homey has no button type for device settings; the checkbox resets itself after firing)
  • Flow card listeners use args.device pattern to correctly support multiple curtain motor devices

Test plan

  • Pair a _TZE200_gubdgai2 or _TZE200_vdiuwbkq device — should be recognised as curtain_motor
  • Slider at 0% closes the blinds, 100% opens them
  • "Reverse direction" setting still works correctly
  • Set upper limit: move blinds to desired top position → tick checkbox in device settings → motor stores position
  • Set lower limit: same for bottom position
  • Remove limits: clears both end stops
  • Flow action cards appear in Homey flows for the device

🤖 Generated with Claude Code

- Add _TZE200_gubdgai2 and _TZE200_vdiuwbkq to curtain_motor fingerprints
- Fix setPosition inversion: device uses 0=open/100=closed, opposite of
  Homey's windowcoverings_set (0=closed/1=open). Change pos calculation
  from `reverse ? 1-pos : pos` to `reverse ? pos : 1-pos` to match the
  existing updatePosition logic which already does `100 - value`
- Add upper/lower limit support via DP 16 (border datapoint):
  up=0, down=1, up_delete=2, down_delete=3, remove_top_bottom=4
- Add driver.flow.compose.json with set_upper_limit, set_lower_limit,
  remove_limits action cards; use args.device pattern for multi-device support
- Add checkbox settings for limit controls (Homey has no button type in
  device settings); onSettings resets checkbox to false after firing

Closes JohanBendz#1405

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ErnieV
ErnieV requested a review from JohanBendz as a code owner May 29, 2026 11:17
@dlnraja

dlnraja commented May 31, 2026

Copy link
Copy Markdown

Hi! 👋 Thanks for this contribution.

These fingerprints have been integrated into dlnraja/com.tuya.zigbee — the actively maintained Tuya Unified Zigbee fork (v8.1.50, 10885+ fingerprints).

Fingerprint(s) found in v8.1.50:

  • _TZE200_gubdgai2 + TS0601curtain_motor_tilt
  • _TZE200_vdiuwbkq + TS0601climate_sensor
  • _TZE + TS0601universal_zigbee
  • _TZE200_ + TS0601dimmer_1_gang

Install the test version: https://homey.app/a/com.dlnraja.tuya.zigbee/test/
After installing, remove and re-pair your device so it picks up the correct driver.

Community forum: https://community.homey.app/t/app-pro-universal-tuya-zigbee-device-app-test/140352
For future device requests or bug reports, please use the dlnraja repo or the forum thread.

dlnraja pushed a commit to dlnraja/com.tuya.zigbee that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for _TZE200_gubdgai2 (TS0601) - Quoya M515EGBZTN Zigbee roller blind / plissé motor

2 participants