Prechádzať zdrojové kódy

Add Hantech 9000 BTU portable air conditioner (#5654)

* Add Hantech 9000 BTU portable AC to portable AC profile

Folds the Hantech (product av6ejal3j9epuw3e) into
costway_portable_ac.yaml per review, and identifies three DPs
shared by both models: 103 = sleep switch, 107 = temp_set_f,
20 = fault/problem sensor. DP behaviour verified locally over
the LAN with tinytuya (protocol 3.5).

* Remove variant from devices list

The list would grow too large if we listed all brand and model variants, so the policy is only the first device for a config gets an entry.

---------

Co-authored-by: grinser <2083410+grinser@users.noreply.github.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
grinser 1 deň pred
rodič
commit
b88715a561

+ 27 - 8
custom_components/tuya_local/devices/costway_portable_ac.yaml

@@ -2,6 +2,9 @@ name: Portable air conditioner
 products:
 products:
   - id: 86sjxqebxymrjt3z
   - id: 86sjxqebxymrjt3z
     manufacturer: Costway
     manufacturer: Costway
+  - id: av6ejal3j9epuw3e
+    manufacturer: Hantech
+    model: 9000 BTU
 entities:
 entities:
   - entity: climate
   - entity: climate
     dps:
     dps:
@@ -42,15 +45,31 @@ entities:
             value: low
             value: low
           - dps_val: high
           - dps_val: high
             value: high
             value: high
-      - id: 20
-        type: integer
-        name: unknown_20
-      - id: 103
-        type: boolean
-        name: unknown_103
       - id: 107
       - id: 107
         type: integer
         type: integer
-        name: unknown_106
+        name: temp_set_f
+        hidden: true
       - id: 109
       - id: 109
         type: integer
         type: integer
-        name: unknown_107
+        name: unknown_109
+  - entity: switch
+    translation_key: sleep
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - 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