Pārlūkot izejas kodu

Add support for KY 35W-10 shutter controller

Issue #1866
Jason Rumney 1 gadu atpakaļ
vecāks
revīzija
c93bc868db

+ 2 - 0
ACKNOWLEDGEMENTS.md

@@ -572,3 +572,5 @@ Further device support has been made with the assistance of users. Please consid
 - [cemilbrowne](https://github.com/cemilbrowne) for contributing support for Luko dehumidifier.
 - [malosaa](https://github.com/malosaa) for contributing support for LSC RGB-CCT lightbulbs.
 - [liouma](https://github.com/liouma) for assisting with support for Kolanky EV chargers.
+- [gy6221](https://github.com/gy6221) for contributing improvements to Atorch SW1P switches.
+- [opolczer](https://github.com/opolczer) for assisting with support for KY 35W-10 shutter controllers.

+ 1 - 0
DEVICES.md

@@ -537,6 +537,7 @@ of device.
 - FS-03W curtain switch with backlight control
 - Graywind window shades
 - Kogan garage door with tilt sensor
+- KY motor 35W-10 shutter controller
 - Loonas smart curtain
 - LoraTap GDC100W garage door opener
 - LoraTap QCSC420W double curtain switch

+ 92 - 0
custom_components/tuya_local/devices/ky_35w10_shutter.yaml

@@ -0,0 +1,92 @@
+name: Shutter controller
+products:
+  - id: hG8tA80YAj0YyxWP
+    name: KY motor 35W-10
+primary_entity:
+  entity: cover
+  class: shutter
+  dps:
+    - id: 101
+      type: string
+      name: control
+      mapping:
+        - dps_val: open
+          value: open
+        - dps_val: close
+          value: close
+        - dps_val: stop
+          value: stop
+    - id: 102
+      type: integer
+      name: current_position
+    - id: 103
+      type: integer
+      name: position
+      optional: true
+      range:
+        min: 0
+        max: 100
+secondary_entities:
+  - entity: number
+    name: Sleep
+    category: config
+    icon: "mdi:power-sleep"
+    dps:
+      - id: 104
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: number
+    name: Rise
+    category: config
+    icon: "mdi:weather-sunset-up"
+    dps:
+      - id: 105
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: number
+    name: View
+    category: config
+    icon: "mdi:panorama"
+    dps:
+      - id: 106
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: select
+    name: Direction
+    icon: "mdi:mdi:sign-direction"
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: option
+        mapping:
+          - dps_val: false
+            value: Forward
+          - dps_val: true
+            value: Reverse
+  - entity: switch
+    name: Hand-pulled
+    icon: "mdi:hand-back-left"
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: false
+            icon: "mdi:hand-back-left--off"