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

Fujicool Yuzu heatpump: fixes from review

- merge some sensors into climate entity
- move some extra attributes to the related entities

PR #2262
Jason Rumney 1 год назад
Родитель
Сommit
22e2058480
1 измененных файлов с 25 добавлено и 33 удалено
  1. 25 33
      custom_components/tuya_local/devices/fujicool_yuzu_heatpump.yaml

+ 25 - 33
custom_components/tuya_local/devices/fujicool_yuzu_heatpump.yaml

@@ -1,4 +1,7 @@
-name: Fujicool-Yuzu Heatpump (F)
+name: Heatpump
+# products:
+#  - id: UNKNOWN
+#    name: Fujicool Yuzu
 primary_entity:
   entity: climate
   translation_only_key: aircon_extra
@@ -32,6 +35,9 @@ primary_entity:
         - scale: 10
           step: 10
       unit: C
+    - id: 3
+      type: integer
+      name: current_temperature
     - id: 4
       type: string
       name: mode
@@ -56,9 +62,9 @@ primary_entity:
           value: high
         - dps_val: strong
           value: strong
-    - id: 20
-      type: bitfield
-      name: fault_code
+    - id: 18
+      type: integer
+      name: current_humidity
     - id: 105
       type: string
       name: sleep_mode
@@ -103,10 +109,6 @@ primary_entity:
     - id: 123
       type: hex
       name: flags_2
-    - id: 125
-      type: string
-      name: air_quality
-      optional: true
     - id: 128
       type: string
       name: model_code
@@ -126,23 +128,20 @@ primary_entity:
       type: json
       name: statistics
 secondary_entities:
-  - entity: sensor
-    class: temperature
-    dps:
-      - id: 3
-        name: sensor
-        type: integer
-        unit: C
-        class: measurement
-  - entity: sensor
-    class: humidity
+  - entity: binary_sensor
+    class: problem
     category: diagnostic
     dps:
-      - id: 18
-        type: integer
+      - id: 20
+        type: bitfield
         name: sensor
-        unit: "%"
-        class: measurement
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 20
+        type: bitfield
+        name: fault_code
   - entity: select
     name: Vertical swing
     category: config
@@ -239,17 +238,6 @@ secondary_entities:
         name: switch
         mapping:
           - mask: "0010"
-  - entity: binary_sensor
-    class: problem
-    category: diagnostic
-    dps:
-      - id: 20
-        type: bitfield
-        name: sensor
-        mapping:
-          - dps_val: 0
-            value: false
-          - value: true
   - entity: sensor
     class: pm25
     category: diagnostic
@@ -260,6 +248,10 @@ secondary_entities:
         unit: ugm3
         optional: true
         class: measurement
+      - id: 125
+        type: string
+        name: air_quality
+        optional: true
   - entity: binary_sensor
     name: Filter
     class: problem