Forráskód Böngészése

Support for AlecoAir D16 PURIFY dehumidifier

More complete than the current AlecoAir D14 profile
Mihai Ambrosie 3 éve
szülő
commit
09df9144de

+ 187 - 0
custom_components/tuya_local/devices/alecoair_d16_dehumidifier.yaml

@@ -0,0 +1,187 @@
+name: AlecoAir D16 dehumidifier
+products:
+  - id: pzq25786mlkxmtbb
+#    name: D16 PURIFY
+primary_entity:
+  entity: humidifier
+  class: dehumidifier
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+      mapping:
+        - dps_val: false
+          icon: "mdi:air-humidifier-off"
+          icon_priority: 1
+        - dps_val: true
+          icon: "mdi:air-humidifier"
+          icon_priority: 4
+    - id: 2
+      name: humidity
+      type: integer
+      range:
+        min: 25
+        max: 80
+      mapping:
+        - step: 5
+    - id: 4
+      name: mode
+      type: string
+      mapping:
+        - dps_val: manual
+          value: Manual
+        - dps_val: laundry
+          value: Dry clothes
+          icon: "mdi:tshirt-crew-outline"
+          icon_priority: 3
+        - dps_val: purify
+          value: Purify
+          icon: "mdi:air-filter"
+          icon_priority: 3
+        - dps_val: sleep
+          value: Sleep
+          icon: "mdi:power-sleep"
+          icon_priority: 3
+    - id: 19
+      name: error
+      type: bitfield
+      # Docs mention E1 and E2, it isn't clear which is tank full, so for now
+      # treat both as that.
+      mapping:
+        - dps_val: 0
+          value: OK
+        - dps_val: 1
+          value: E1
+          icon: "mdi:cup-water"
+          icon_priority: 2
+        - dps_val: 2
+          value: E2
+          icon: "mdi:cup-water"
+          icon_priority: 2
+secondary_entities:
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 4
+        type: string
+        name: dehumidifier_mode
+        hidden: true
+      - id: 5
+        type: string
+        name: speed
+        mapping:
+          - dps_val: low
+            value: 50
+            constraint: dehumidifier_mode
+            conditions:
+              - dps_val: laundry
+                invalid: true
+          - dps_val: high
+            value: 100
+            constraint: dehumidifier_mode
+            conditions:
+              - dps_val: sleep
+                invalid: true
+              - dps_val: purify
+                invalid: true
+  - entity: switch
+    name: Ionizer
+    icon: "mdi:creation"
+    dps:
+      - id: 10
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Current humidity
+    class: humidity
+    dps:
+      - id: 16
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: binary_sensor
+    name: Tank
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 19
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: lock
+    name: Child lock
+    category: config
+    dps:
+      - id: 14
+        type: boolean
+        name: lock
+        mapping:
+          - dps_val: true
+            icon: "mdi:hand-back-right-off"
+          - dps_val: false
+            icon: "mdi:hand-back-right"
+  - entity: select
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 17
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: "Off"
+          - dps_val: 1h
+            value: 1 hour
+          - dps_val: 2h
+            value: 2 hours
+          - dps_val: 3h
+            value: 3 hours
+          - dps_val: 4h
+            value: 4 hours
+          - dps_val: 5h
+            value: 5 hours
+          - dps_val: 6h
+            value: 6 hours
+          - dps_val: 7h
+            value: 7 hours
+          - dps_val: 8h
+            value: 8 hours
+          - dps_val: 9h
+            value: 9 hours
+          - dps_val: 10h
+            value: 10 hours
+          - dps_val: 11h
+            value: 11 hours
+          - dps_val: 12h
+            value: 12 hours
+          - dps_val: 13h
+            value: 13 hours
+          - dps_val: 14h
+            value: 14 hours
+          - dps_val: 15h
+            value: 15 hours
+          - dps_val: 16h
+            value: 16 hours
+          - dps_val: 17h
+            value: 17 hours
+          - dps_val: 18h
+            value: 18 hours
+          - dps_val: 19h
+            value: 19 hours
+          - dps_val: 20h
+            value: 20 hours
+          - dps_val: 21h
+            value: 21 hours
+          - dps_val: 22h
+            value: 22 hours
+          - dps_val: 23h
+            value: 23 hours
+          - dps_val: 24h
+            value: 24 hours