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

Add Chigo air conditioner (jqfsu2e8pvpce5ra) (#5414)

* Add Chigo air conditioner (jqfsu2e8pvpce5ra)

Local config for a Chigo Wi-Fi air conditioner. DP map verified against the
Tuya cloud thing-model API (abilityId == DP id), including the turbo/swing/timer
datapoints that the standard instruction set hides.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: use translation_key for Sleep switch and Timer number

CI's untranslated_entities check flagged that existing en.json
translations already cover "sleep" (switch) and "timer" (number),
so the explicit names should be replaced with translation_key
references instead.

* fix: address review feedback on Chigo air conditioner config

- Use generic top-level name so other products can share this file
- Split product name into manufacturer/model (FCH-12-UI-UE)
- Move horizontal/vertical swing from standalone switches to the
  climate entity's swing_horizontal_mode/swing_mode attributes

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fuomag9 6 дней назад
Родитель
Сommit
e62bba580f
1 измененных файлов с 106 добавлено и 0 удалено
  1. 106 0
      custom_components/tuya_local/devices/chigo_air_conditioner.yaml

+ 106 - 0
custom_components/tuya_local/devices/chigo_air_conditioner.yaml

@@ -0,0 +1,106 @@
+# Chigo Tuya AC (product jqfsu2e8pvpce5ra).
+# DP map verified via Tuya cloud thing-model (abilityId == DP id).
+name: Air conditioner
+products:
+  - id: jqfsu2e8pvpce5ra
+    manufacturer: Chigo
+    model: FCH-12-UI-UE
+entities:
+  - entity: climate
+    dps:
+      # Power (DP1) + mode (DP4) together drive hvac_mode.
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        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: hot
+                value: heat
+              - dps_val: wet
+                value: dry
+              - dps_val: wind
+                value: fan_only
+      - id: 2
+        type: integer
+        name: temperature
+        range:
+          min: 16
+          max: 32
+        unit: C
+      - id: 3
+        type: integer
+        name: current_temperature
+      - id: 4
+        type: string
+        name: mode
+        hidden: true
+      # DP5 enum 1..4 = auto/low/medium/high (per Tuya model description).
+      - id: 5
+        type: string
+        name: fan_mode
+        mapping:
+          - dps_val: "1"
+            value: auto
+          - dps_val: "2"
+            value: low
+          - dps_val: "3"
+            value: medium
+          - dps_val: "4"
+            value: high
+      # DP103 (left/right louvre) and DP104 (up/down louvre) map to the
+      # climate entity's swing attributes rather than standalone switches.
+      - id: 103
+        type: boolean
+        name: swing_horizontal_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: "on"
+      - id: 104
+        type: boolean
+        name: swing_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: "on"
+
+  # Independent boolean features -> plain switches so the HomeKit bridge
+  # exposes each as a switch (do NOT give them entity_category, or HomeKit
+  # would hide them as config entities).
+  - entity: switch
+    translation_key: sleep
+    icon: "mdi:power-sleep"
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Turbo
+    icon: "mdi:fan-plus"
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+
+  # Countdown timer 0-24h (0 = off).
+  - entity: number
+    translation_key: timer
+    icon: "mdi:timer-outline"
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 24