Преглед изворни кода

feat: add support for AM24 venetian blinds motor

Issue #3110
Jason Rumney пре 4 месеци
родитељ
комит
93de1edbec
3 измењених фајлова са 123 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 121 0
      custom_components/tuya_local/devices/am24_blind_motor.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1050,3 +1050,4 @@ Further device support has been made with the assistance of users. Please consid
 - [blackscreener](https://github.com/blackscreener) for contributing support for ILIFE V20 and A30 pro robot vacuums.
 - [IshanAPatel](https://github.com/IshanAPatel) for contributing support for two models of Globe ceiling fans with RGBCW lights.
 - [swarshah](https://github.com/swarshah) for contributing support for 4-in-1 10GHz motion sensor.
+- [fragpic](https://github.com/fragpic) for assisting with support for AM24 venetian blinds motor.

+ 1 - 0
DEVICES.md

@@ -1102,6 +1102,7 @@ port and password.
 
 - Adaprox Fingerbot plus
 - Ailrinni fingerprint door lock
+- AM24 venetian blinds motor
 - Arlec smart button
 - Arlec usb strip light
 - BSTUOKEY Invisible induction door lock

+ 121 - 0
custom_components/tuya_local/devices/am24_blind_motor.yaml

@@ -0,0 +1,121 @@
+name: Venetian blinds
+products:
+  - id: dy4dh1q0
+    model: AM24
+entities:
+  - entity: cover
+    class: blind
+    dps:
+      - id: 1
+        type: string
+        name: control
+        mapping:
+          - dps_val: open
+            value: open
+          - dps_val: stop
+            value: stop
+          - dps_val: close
+            value: close
+          - dps_val: continue
+            # HA does not support this
+            hidden: true
+      - id: 2
+        type: integer
+        name: position
+        optional: true
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - invert: true
+          - dps_val: null
+            value_mirror: current_position
+      - id: 3
+        type: integer
+        name: current_position
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - invert: true
+      - id: 7
+        type: string
+        name: work_state
+      - id: 101
+        type: integer
+        name: tilt_position
+        range:
+          min: 1
+          max: 10
+        mapping:
+          - scale: 0.1
+  - entity: select
+    name: Direction
+    category: config
+    dps:
+      - id: 5
+        type: string
+        name: option
+        mapping:
+          - dps_val: forward
+            value: Clockwise
+            icon: "mdi:horizontal-rotate-clockwise"
+          - dps_val: back
+            value: Anti-clockwise
+            icon: "mdi:horizontal-rotate-counterclockwise"
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 12
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 12
+        type: bitfield
+        optional: true
+        name: fault_code
+  - entity: select
+    name: Border
+    icon: "mdi:arrow-expand-vertical"
+    category: config
+    dps:
+      - id: 16
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: up
+            value: Top
+          - dps_val: down
+            value: Bottom
+          - dps_val: delete_limit
+            value: Clear
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    hidden: true
+    dps:
+      - id: 102
+        optional: true
+        type: boolean
+        name: button
+  - entity: select
+    name: Speed
+    icon: "mdi:blinds-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: string
+        name: option
+        mapping:
+          - dps_val: continue
+            value: Normal
+          - dps_val: crawl
+            value: Slow