Преглед на файлове

Add support for SHerko curtain motors.

Issue #583
Jason Rumney преди 2 години
родител
ревизия
0c1006fcbb
променени са 3 файла, в които са добавени 71 реда и са изтрити 0 реда
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 69 0
      custom_components/tuya_local/devices/sherko_curtain.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -238,3 +238,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [tientmit88](https://github.com/tientmit88) for contributing support for Moes motion sensor lights.
 - [matteozamu](https://github.com/matteozamu) for assisting with support for LoraTap garage doors.
 - [chemicalstorm](https://github.com/chemicalstorm) for contributing support for Catit pixi 6-meal pet feeder.
+- [darki73](https://github.com/darki73) for contributing support for SHerko smart curtain motorss.

+ 1 - 0
DEVICES.md

@@ -304,6 +304,7 @@ of device.
 - LoraTap SC500W-V1 curtain switch
 - M027 curtain module (sold under several brands, including zemismart, meterk and others)
 - QS-WIFI-C01(BK) curtain module
+- SHerko curtain motor
 - Wistar roller blind controller
 - Zemismart curtain rail
 - Zemismart roller shade

+ 69 - 0
custom_components/tuya_local/devices/sherko_curtain.yaml

@@ -0,0 +1,69 @@
+name: Curtain motor
+products:
+  - id: h2wipnagcunsar5r
+    name: SHerko curtain motor
+primary_entity:
+  entity: cover
+  class: curtain
+  dps:
+    - id: 1
+      type: string
+      name: control
+      mapping:
+        - dps_val: open
+          value: open
+        - dps_val: close
+          value: close
+        - dps_val: stop
+          value: stop
+        # - dps_val: continue
+        #   value: continue
+    - id: 2
+      type: integer
+      name: position
+      unit: "%"
+      range:
+        min: 0
+        max: 100
+    - id: 3
+      type: integer
+      name: current_position
+      unit: "%"
+      optional: true
+    - id: 7
+      type: string
+      name: action
+      mapping:
+        - dps_val: opening
+          constraint: current_position
+          conditions:
+            - dps_val: 100
+              value: opened
+            - dps_val: null
+              value: opened
+            - value: opening
+        - dps_val: closing
+          constraint: current_position
+          conditions:
+            - dps_val: 0
+              value: closed
+            - dps_val: null
+              value: closed
+            - value: closing
+secondary_entities:
+  - entity: switch
+    category: config
+    name: Reverse Motor Direction
+    icon: "mdi:arrow-u-down-left"
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: switch
+    category: config
+    name: Auto Power
+    icon: "mdi:flash-auto"
+    dps:
+      - id: 6
+        type: boolean
+        name: switch