Просмотр исходного кода

Add support for 2 devices (LDH-7700 dehumidifier and uk002wl2 2gang switch) (#4994)

* Add support for LDH-7700 dehumidifier

* Add support for uk002wl2 2gang switch

* mend

* mend

* mend

* mend

* fixed error of extended translation_key

* fix(ldh7700_dehumidifier): merge current humidity to humidifier

humidifier should have the current humidity sensor to complete the hygrostat card.
 PR #4994

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
민중 1 неделя назад
Родитель
Сommit
ffc5e65014

+ 86 - 0
custom_components/tuya_local/devices/ldh7700_dehumidifier.yaml

@@ -0,0 +1,86 @@
+name: Dehumidifier
+products:
+  - id: msopwdnvklxbrnw9
+    model: LDH-7700
+entities:
+  - entity: humidifier
+    class: dehumidifier
+    translation_key: extended
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 2
+        type: integer
+        name: humidity
+        range:
+          min: 30
+          max: 80
+        mapping:
+          - step: 5
+      - id: 5
+        type: string
+        name: mode
+        mapping:
+          - dps_val: Continuities
+            value: continuous
+          - dps_val: Sleep
+            value: sleep
+          - dps_val: Auto
+            value: auto
+      - id: 6
+        type: integer
+        name: current_humidity
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 5
+        type: string
+        name: available
+        mapping:
+          - dps_val: Continuities
+            value: true
+          - value: false
+      - id: 4
+        type: string
+        name: speed
+        mapping:
+          - dps_val: low
+            value: 50
+          - dps_val: high
+            value: 100
+  - entity: switch
+    translation_key: ionizer
+    dps:
+      - id: 10
+        type: boolean
+        name: switch
+  - entity: lock
+    translation_key: child_lock
+    dps:
+      - id: 16
+        type: boolean
+        name: lock
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: binary_sensor
+    class: problem
+    dps:
+      - id: 19
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 19
+        type: bitfield
+        name: fault_code

+ 64 - 0
custom_components/tuya_local/devices/uk002wl2_2gang_switch.yaml

@@ -0,0 +1,64 @@
+name: Dual Switch
+products:
+  - id: uytmbjaogpksyu7i
+    model: uk002wl2
+entities:
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: light
+    translation_key: backlight
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 14
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+          - dps_val: memory
+            value: memory
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 7
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 8
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400