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

Add Haier Airmart AC support (#4050)

* Add Haier Airmart AC configuration file

* Update haier_airmart_ac.yaml

* Update haier_airmart_ac.yaml

* Update Haier Airmart AC YAML configuration

Refactor climate entity configuration and remove unused properties.

* Refactor haier_airmart_ac.yaml for consistency

* Rename hvac_mode to mode and remove temperature sensor

Updated hvac_mode to mode and removed current_temperature sensor.

* Update haier_airmart_ac.yaml

* Update haier_airmart_ac.yaml

* feat (haier_airmart_ac): changes from review

- top level name should be generic
- product doesn't need a name that is a repeat of model
- use translation_key rather than explicit name and icon

PR #4050

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
jlopez77 2 месяцев назад
Родитель
Сommit
47d133a3fd
1 измененных файлов с 78 добавлено и 0 удалено
  1. 78 0
      custom_components/tuya_local/devices/haier_airmart_ac.yaml

+ 78 - 0
custom_components/tuya_local/devices/haier_airmart_ac.yaml

@@ -0,0 +1,78 @@
+name: Air conditioner
+products:
+  - id: keycnvksyhjcrg8t
+    manufacturer: Haier
+    model: Airmart wall AC
+
+entities:
+  #####################################################
+  # MAIN CLIMATE ENTITY
+  #####################################################
+  - entity: climate
+    translation_key: aircon_extra
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: cold
+                value: cool
+              - dps_val: hot
+                value: heat
+              - dps_val: auto
+                value: heat_cool
+              - dps_val: wet
+                value: dry
+
+      - id: 2
+        name: temperature
+        type: integer
+        range:
+          min: 16
+          max: 30
+        unit: C
+
+      - id: 3
+        name: current_temperature
+        type: integer
+        mapping:
+          - scale: 2
+        unit: C
+
+      - id: 4
+        name: mode
+        type: string
+
+      - id: 5
+        name: fan_mode
+        type: string
+        mapping:
+          - dps_val: auto
+            value: auto
+          - dps_val: low
+            value: low
+          - dps_val: mid
+            value: medium
+          - dps_val: high
+            value: high
+
+      - id: 117
+        name: swing_mode
+        type: string
+        optional: true
+        mapping:
+          - dps_val: ud_0c
+            value: "on"
+          - dps_val: ud_00
+            value: "off"
+
+      - id: 118
+        name: swing_horizontal
+        type: string
+        optional: true
+        readonly: true