瀏覽代碼

feat(devices): add Duux North portable air conditioner

Issue #5140
Jason Rumney 1 月之前
父節點
當前提交
c0f018a815
共有 2 個文件被更改,包括 153 次插入1 次删除
  1. 1 1
      DEVICES.md
  2. 152 0
      custom_components/tuya_local/devices/duux_north_airconditioner.yaml

+ 1 - 1
DEVICES.md

@@ -117,7 +117,7 @@
 - Daizuki heat pump
 - Della air conditioner
 - De'Longhi Pinguino portable air conditioner
-- Duux Blizzard portable air conditioner
+- Duux Blizzard and North portable air conditioners
 - Eberg Cooly C35HD
 - Eberg Qubo Q40HD
 - EG4 solar heat pump

+ 152 - 0
custom_components/tuya_local/devices/duux_north_airconditioner.yaml

@@ -0,0 +1,152 @@
+name: Air conditioner
+products:
+  - id: uym25ctpiq6rjtmv
+    manufacturer: Duux
+    model: North
+entities:
+  - entity: climate
+    dps:
+      - id: 1
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode1
+            conditions:
+              - dps_val: "1"  # cold
+                value: cool
+                # 2: heat not supported by this model
+              - dps_val: "3"  # wet
+                value: dry
+                # 4: purification not suported by this model
+              - dps_val: "5"  # fan
+                value: fan_only
+      - id: 2
+        type: integer
+        name: temperature
+        range:
+          min: 16
+          max: 31
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: true
+                value_redirect: temp_set_f
+                range:
+                  min: 62
+                  max: 90
+      - id: 3
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: true
+                value_redirect: temp_current_f
+      - id: 17
+        type: integer
+        name: humidity
+        range:
+          min: 0
+          max: 100
+      - id: 101
+        type: string
+        name: mode1
+      - id: 103
+        type: boolean
+        name: preset_mode
+        mapping:
+          - dps_val: false
+            value: comfort
+          - dps_val: true
+            value: sleep
+      - id: 104
+        type: string
+        name: fan_mode
+        mapping:
+          - dps_val: "3"
+            value: low
+          - dps_val: "2"
+            value: medium
+          - dps_val: "1"
+            value: high
+      - id: 106
+        type: boolean
+        name: swing_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: "on"
+      - id: 109
+        type: boolean
+        name: temperature_unit
+        mapping:
+          - dps_val: true
+            value: F
+          - value: C
+      - id: 110
+        type: integer
+        name: temp_set_f
+        range:
+          min: 62
+          max: 90
+        hidden: true
+        optional: true
+      - id: 111
+        type: integer
+        name: temp_current_f
+        hidden: true
+        optional: true
+      - id: 112
+        type: integer
+        name: current_humidity
+  # At least some firmware versions do not like combining dps into hvac_mode
+  # above, so provide a simple single dp on/off switch as an alternative
+  - entity: switch
+    name: Power
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 109
+        type: boolean
+        name: option
+        mapping:
+          - dps_val: false
+            value: celsius
+          - dps_val: true
+            value: fahrenheit
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 20
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 20
+        type: bitfield
+        name: fault_code
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 24