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

Add support for Duux Beam 2 (#4486)

* Add support for Duux Beam 2

* Fix linting issues

* Address the code review comments

* use the translation for continuous

* Rename duux_beam_2.yaml to duux_beam2_humidifier.yaml

- remove unnecessary icon

PR #4486

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Rafał Plinzner 2 недель назад
Родитель
Сommit
b60253a9e6
1 измененных файлов с 137 добавлено и 0 удалено
  1. 137 0
      custom_components/tuya_local/devices/duux_beam2_humidifier.yaml

+ 137 - 0
custom_components/tuya_local/devices/duux_beam2_humidifier.yaml

@@ -0,0 +1,137 @@
+name: Humidifier
+products:
+  - id: wksnqcoh6yzpoam9
+    manufacturer: Duux
+    model: Beam 2
+entities:
+  - entity: humidifier
+    class: humidifier
+    translation_key: extended
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 15
+        name: humidity
+        type: integer
+        optional: true
+        range:
+          min: 40
+          max: 90
+        mapping:
+          - step: 5
+      - id: 16
+        name: current_humidity
+        type: integer
+      - id: 12
+        name: mode
+        type: string
+        optional: true
+        mapping:
+          - dps_val: auto
+            value: "auto"
+          - dps_val: general
+            value: "continuous"
+  - entity: fan
+    icon: "mdi:spray"
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 2
+        name: speed
+        type: string
+        optional: true
+        mapping:
+          #  "large" is the lowest device's fan speed.
+          - dps_val: large
+            value: 33
+          - dps_val: middle
+            value: 50
+          - dps_val: small
+            value: 100
+  - entity: light
+    translation_key: nightlight
+    category: config
+    dps:
+      - id: 5
+        name: switch
+        type: boolean
+        optional: true
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 14
+        type: integer
+        optional: true
+        name: sensor
+        class: measurement
+        unit: C
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 3
+        name: option
+        type: string
+        optional: true
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: "1"
+            value: 1h
+          - dps_val: "2"
+            value: 2h
+          - dps_val: "3"
+            value: 3h
+          - dps_val: "4"
+            value: 4h
+          - dps_val: "5"
+            value: 5h
+          - dps_val: "6"
+            value: 6h
+  - entity: switch
+    translation_key: sleep
+    category: config
+    dps:
+      - id: 21
+        name: switch
+        type: boolean
+        optional: true
+  - entity: switch
+    dps:
+      - id: 10
+        type: boolean
+        optional: true
+        name: switch
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 9
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: 1
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 9
+        type: bitfield
+        name: fault_code
+        optional: true
+  - entity: binary_sensor
+    translation_key: tank_empty
+    dps:
+      - id: 9
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 1
+            value: true
+          - value: false