Răsfoiți Sursa

Add support for Avatto CLS02 curtain with dual lights

Issue #3107
Jason Rumney 9 luni în urmă
părinte
comite
509e77ed13

+ 2 - 1
ACKNOWLEDGEMENTS.md

@@ -146,7 +146,7 @@ Further device support has been made with the assistance of users. Please consid
 - [billxinli](https://github.com/billxinli) for contributing support for Honeywell TP dehumidifiers.
 - [isarib01](https://github.com/isarib01) for assistance supporting Deta motion sensor lights.
 - [iDontWantAUsername](https://github.com/iDontWantAUsername) for assistance supporting Grid Connect USB charger with power socket.
-- [engusz](https://github.com/engusz) for assistance supporting Avatto curtain switches and dual switch with timers.
+- [engusz](https://github.com/engusz) for assistance supporting Avatto CL02 curtain switches and dual switch with timers.
 - [81k5](https://github.com/81k5) for assistance supporting Aubess smart switches.
 - [SvenMartin81](https://github.com/SvenMartin81) for assistance supporting another variant of common smartplug (via GNCC branded one)
 - [cjones813](https://github.com/cjones813) for assistance supporting HJZ radiator, and contributing Benexmart blinds support.
@@ -908,3 +908,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Zycrannny](https://github.com/Zycrannny) for assisting with support for Prestige M3 ceiling fan with light.
 - [hcanIngo](https://github.com/hcanIngo) for contributing support for Powerworld PW040 water+air heat pump.
 - [amantia](https://github.com/amantia) for contributing improvements to Axen water+air heat pump.
+- [gmudrets](https://github.com/gmudrets) for assisting with support for Avatto CLS02 curtain with dual lights.

+ 1 - 1
DEVICES.md

@@ -734,7 +734,7 @@ of device.
 - Abalon BCM700D curtain motor (likely to work with other brands)
 - AGL Ultracontato r2 door controller
 - AGL Ultra Magic gate opener
-- Avatto curtain and double light switch
+- Avatto curtain and double light switch (CL02, CLS02 models)
 - Avatto curtain and light switch
 - Avatto curtain switch
 - Avatto roller blind controller

+ 166 - 0
custom_components/tuya_local/devices/avatto_cls02_curtainduallights.yaml

@@ -0,0 +1,166 @@
+name: Curtain and lights
+products:
+  - id: jcw6pwi3f7ew4s0f
+    manufacturer: Avatto
+    model: SYS-CLS02
+entities:
+  - entity: cover
+    class: curtain
+    dps:
+      - id: 1
+        name: control
+        type: string
+        mapping:
+          - dps_val: open
+            value: open
+          - dps_val: close
+            value: close
+          - dps_val: stop
+            value: stop
+      - id: 2
+        name: position
+        type: integer
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - step: 10
+  - entity: light
+    name: Light 1
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+  - entity: light
+    name: Light 2
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+  - entity: select
+    name: Calibration
+    icon: "mdi:curtains"
+    category: config
+    dps:
+      - id: 3
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: start
+            value: Start
+          - dps_val: end
+            value: End
+  - entity: light
+    translation_key: backlight
+    category: config
+    dps:
+      - id: 7
+        type: boolean
+        name: switch
+  - entity: select
+    name: Direction
+    icon: "mdi:arrow-u-down-left"
+    category: config
+    dps:
+      - id: 8
+        type: string
+        name: option
+        mapping:
+          - dps_val: forward
+            value: Forward
+          - dps_val: back
+            value: Back
+  - entity: number
+    name: Travel time
+    category: config
+    class: duration
+    icon: "mdi:timer"
+    dps:
+      - id: 10
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 10
+          max: 120
+  - entity: number
+    name: Light 1 timer
+    category: config
+    class: duration
+    translation_key: timer
+    dps:
+      - id: 104
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: Light 2 timer
+    category: config
+    class: duration
+    translation_key: timer
+    dps:
+      - id: 107
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    name: Percentage switch
+    icon: "mdi:percent-box"
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        name: option
+        mapping:
+          - dps_val: true
+            value: percent_on
+          - dps_val: false
+            value: percent_off
+  - entity: text
+    name: Random schedule 1
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
+      - id: 103
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Random schedule 2
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
+      - id: 106
+        type: base64
+        optional: true
+        name: value
+  - entity: number
+    name: Calibration position
+    category: config
+    icon: "mdi:curtains"
+    dps:
+      - id: 108
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100