Prechádzať zdrojové kódy

feat(devices): add Shanglin Motor Pergola controller

- 4 shades + 1 blind
- 1 light with brightness

Issue #5742
Jason Rumney 4 dní pred
rodič
commit
ff9b1abb85

+ 1 - 0
DEVICES.md

@@ -1062,6 +1062,7 @@ of device.
 - QS-WIFI-C01(BK) curtain module
 - QS-WIFI-C02 dual curtain module
 - Safe CON09 barrier controller
+- Shanglin Motor FD-1515 Pergola controller
 - SHerko curtain motor
 - SmartCurtains A-series ACS-WT curtain motor (may work for other models)
 - Wistar roller blind controller

+ 181 - 0
custom_components/tuya_local/devices/shanglin_fd1515_pergola.yaml

@@ -0,0 +1,181 @@
+name: Pergola
+products:
+  - id: pyfin3kae081iczb
+    manufacturer: Shanglin Motor
+    model: FD-1515
+entities:
+  - entity: cover
+    name: Front
+    class: shade
+    dps:
+      - id: 101
+        type: string
+        name: shade
+        hidden: true
+      - id: 102
+        type: string
+        optional: true
+        name: control
+        mapping:
+          - dps_val: up
+            constraint: shade
+            conditions:
+              - dps_val: front
+                value: open
+          - dps_val: down
+            constraint: shade
+            conditions:
+              - dps_val: front
+                value: close
+          - dps_val: stop
+            constraint: shade
+            conditions:
+              - dps_val: front
+                value: stop
+      - id: 107
+        type: bitfield
+        optional: true
+        name: open
+        mapping:
+          - dps_val: 1
+            value: true
+          - value: false
+  - entity: cover
+    name: Back
+    class: shade
+    dps:
+      - id: 101
+        type: string
+        name: shade
+        hidden: true
+      - id: 102
+        type: string
+        optional: true
+        name: control
+        mapping:
+          - dps_val: up
+            constraint: shade
+            conditions:
+              - dps_val: back
+                value: open
+          - dps_val: down
+            constraint: shade
+            conditions:
+              - dps_val: back
+                value: close
+          - dps_val: stop
+            constraint: shade
+            conditions:
+              - dps_val: back
+                value: stop
+      - id: 107
+        type: bitfield
+        optional: true
+        name: open
+        mapping:
+          - dps_val: 256
+            value: true
+          - value: false
+  - entity: cover
+    name: Left
+    class: shade
+    dps:
+      - id: 101
+        type: string
+        name: shade
+        hidden: true
+      - id: 102
+        type: string
+        optional: true
+        name: control
+        mapping:
+          - dps_val: up
+            constraint: shade
+            conditions:
+              - dps_val: left
+                value: open
+          - dps_val: down
+            constraint: shade
+            conditions:
+              - dps_val: left
+                value: close
+          - dps_val: stop
+            constraint: shade
+            conditions:
+              - dps_val: left
+                value: stop
+      - id: 107
+        type: bitfield
+        optional: true
+        name: open
+        mapping:
+          - dps_val: 65536
+            value: true
+          - value: false
+  - entity: cover
+    name: Right
+    class: shade
+    dps:
+      - id: 101
+        type: string
+        name: shade
+        hidden: true
+      - id: 102
+        type: string
+        optional: true
+        name: control
+        mapping:
+          - dps_val: up
+            constraint: shade
+            conditions:
+              - dps_val: right
+                value: open
+          - dps_val: down
+            constraint: shade
+            conditions:
+              - dps_val: right
+                value: close
+          - dps_val: stop
+            constraint: shade
+            conditions:
+              - dps_val: right
+                value: stop
+      - id: 107
+        type: bitfield
+        optional: true
+        name: open
+        mapping:
+          - dps_val: 16777216
+            value: true
+          - value: false
+  - entity: light
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+      - id: 104
+        name: brightness
+        type: integer
+        range:
+          min: 10
+          max: 100
+  - entity: cover
+    class: blind
+    dps:
+      - id: 105
+        type: string
+        name: control
+        mapping:
+          - dps_val: open
+            value: open
+          - dps_val: close
+            value: close
+          - dps_val: stop
+            value: stop
+      - id: 106
+        type: string
+        name: open
+        mapping:
+          - dps_val: open
+            value: true
+          - value: false