From e8cb3433961522af6a8e288610c6adabfd4a28b5 Mon Sep 17 00:00:00 2001 From: Privatecoder <45964815+Privatecoder@users.noreply.github.com> Date: Mon, 13 Jan 2025 21:00:27 +0100 Subject: [PATCH 1/2] add suport for GW Motor Roller blind (Gateway sub-device) --- .../devices/gw_motor_roller_blind.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 custom_components/tuya_local/devices/gw_motor_roller_blind.yaml diff --git a/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml b/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml new file mode 100644 index 0000000000..66999fc681 --- /dev/null +++ b/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml @@ -0,0 +1,50 @@ +name: Roller blind +products: + - id: slrxhmozdm3qq9cl + manufacturer: GW Motor + model: Roller blind + name: Sub-device roller blind (gateway) +entities: + - entity: cover + class: blind + dps: + - id: 1 + name: control + type: string + mapping: + - conditions: + - dps_val: ["0", "1", "2"] + mapping: + - dps_val: "0" + value: open + - dps_val: "1" + value: close + - dps_val: "2" + value: stop + # set options when there are non during startup + - dps_val: null + mapping: + - dps_val: open + value: open + - dps_val: close + value: close + - dps_val: stop + value: stop + - id: 2 + # this is percent_control in the API Explorer but we'll use it to get the + # last position set, as the device cannot report its current_position. + # will be incorrect when manually opening / closing. + name: percent_control + type: integer + unit: "%" + optional: true + range: + min: 0 + max: 100 + - id: 101 + name: position + type: integer + unit: "%" + range: + min: 0 + max: 100 From 45abc9edf17c174a93c885270cb79e17d6755467 Mon Sep 17 00:00:00 2001 From: Privatecoder <45964815+Privatecoder@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:45:53 +0100 Subject: [PATCH 2/2] fix typo, fix max-length --- .../tuya_local/devices/gw_motor_roller_blind.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml b/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml index 66999fc681..c32adf593e 100644 --- a/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml +++ b/custom_components/tuya_local/devices/gw_motor_roller_blind.yaml @@ -31,10 +31,10 @@ entities: - dps_val: stop value: stop - id: 2 - # this is percent_control in the API Explorer but we'll use it to get the + # this is percent_control in API Explorer but we'll use it to get the # last position set, as the device cannot report its current_position. # will be incorrect when manually opening / closing. - name: percent_control + name: current_position type: integer unit: "%" optional: true