Mihai Ambrosie 3 лет назад
Родитель
Сommit
bb5348ed85
1 измененных файлов с 126 добавлено и 0 удалено
  1. 126 0
      custom_components/tuya_local/devices/alecoair_d12_dehumidifier.yaml

+ 126 - 0
custom_components/tuya_local/devices/alecoair_d12_dehumidifier.yaml

@@ -0,0 +1,126 @@
+name: AlecoAir D12 dehumidifier
+products:
+  - id: gcthce4ejb8nzgow
+#    name: D12 ECO 2.0
+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: 20
+        max: 95
+      mapping:
+        - step: 5
+    - id: 5
+      name: mode
+      type: string
+      mapping:
+        - dps_val: Continuous
+          value: Continuous
+          icon: mdi:tshirt-crew-outline
+          icon_priority: 3
+        - dps_val: Sunny_Day
+          value: Sunny_Day
+          icon: "mdi:weather-sunny"
+          icon_priority: 3
+        - dps_val: Rain_Day
+          value: Rain_Day
+          icon: "mdi:weather-pouring"
+          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: speed
+        mapping:
+          - dps_val: low
+            value: 50
+          - dps_val: high
+            value: 100
+  - entity: sensor
+    name: Current humidity
+    class: humidity
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    name: Current temperature
+    class: temperature
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: switch
+    name: Sleep
+    category: config
+    dps:
+      - id: 14
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: false
+            icon: "mdi:sleep-off"
+          - dps_val: true
+            icon: "mdi:sleep"
+  - entity: lock
+    name: Child lock
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: lock
+        mapping:
+          - dps_val: false
+            icon: "mdi:hand-back-right"
+          - dps_val: true
+            icon: "mdi:hand-back-right-off"
+  - entity: binary_sensor
+    name: Tank
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 19
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true