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

Add TruCool TC1160 Air Conditioner device

Felwat 9 месяцев назад
Родитель
Сommit
5eef54d1a2
1 измененных файлов с 159 добавлено и 0 удалено
  1. 159 0
      custom_components/tuya_local/devices/trucool_tc1160_airconditioner.yaml

+ 159 - 0
custom_components/tuya_local/devices/trucool_tc1160_airconditioner.yaml

@@ -0,0 +1,159 @@
+name: Air conditioner
+products:
+  - id: wl0rysa7fts3j8ll
+    manufacturer: TruCool
+    model: TC1160
+entities:
+  - entity: climate
+    dps:
+      - id: 1
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: auto
+                value: heat_cool
+              - dps_val: cold
+                value: cool
+              - dps_val: wind
+                value: fan_only
+              - dps_val: wet
+                value: dry
+              - dps_val: hot
+                value: heat
+      - id: 2
+        name: temperature
+        type: float
+        unit: C
+        range:
+          min: 15.0
+          max: 31.12
+          # I set max with an extra .12 to account for temperature unit conversion shenanigans.
+          # (88°F = 31.1111°C) The AC automaticaly rounds floats to the nearest whole.
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: F
+                value_redirect: temperature_f
+                range:
+                  min: 59.0
+                  max: 88.0
+      - id: 3
+        name: current_temperature
+        type: integer
+      - id: 4
+        name: mode
+        type: string
+        hidden: true
+      - id: 5
+        name: fan_mode
+        type: string
+        mapping:
+          - dps_val: "1"
+            value: low
+          - dps_val: "2"
+            value: medium
+          - dps_val: "3"
+            value: high
+      - id: 19
+        type: string
+        name: temperature_unit
+        hidden: true
+      - id: 101
+        type: boolean
+        name: preset_mode
+        mapping:
+          - dps_val: true
+            value: sleep
+          - dps_val: false
+            value: none
+      - id: 104
+        name: swing_mode
+        type: boolean
+        mapping:
+          - dps_val: true
+            value: "on"
+          - dps_val: false
+            value: "off"
+      - id: 108
+        type: float
+        name: temperature_f
+        hidden: true
+  - entity: select
+    translation_key: temperature_unit
+    dps:
+      - id: 19
+        name: option
+        type: string
+        mapping:
+          - dps_val: C
+            value: celsius
+          - dps_val: F
+            value: fahrenheit
+  - entity: binary_sensor
+    translation_key: defrost
+    dps:
+      - id: 102
+        type: boolean
+        name: sensor
+  - entity: number
+    class: duration
+    translation_key: timer_x
+    translation_placeholders:
+      x: set
+    mode: box
+    icon: mdi:timer-edit
+    dps:
+      - id: 103
+        name: value
+        type: integer
+        unit: hour
+        force: true
+        range:
+          min: 0
+          max: 24
+        mapping:
+          - dps_val: 0
+            icon: mdi:timer-cancel
+  - entity: sensor
+    name: Timer
+    icon: mdi:timer
+    dps:
+      - id: 105
+        name: sensor
+        type: integer
+        unit: min
+        mapping:
+          - dps_val: 0
+            icon: mdi:timer-off
+  - entity: binary_sensor
+    class: problem
+    dps:
+      - id: 106
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 106
+        type: bitfield
+        name: fault_code
+
+  # Don't know what bMachineType and bShakeEn are for
+  # - entity: binary_sensor
+  #   name: bMachineType
+  #   dps:
+  #     - id: 107
+  #       type: boolean
+  #       name: sensor
+  # - entity: binary_sensor
+  #   name: bShakeEn
+  #   dps:
+  #     - id: 109
+  #       type: boolean
+  #       name: sensor