Bläddra i källkod

Vivax heatpump: expand to support Tadiran Apollo

Tadiran Apollo seems to be compatible, but has a few more dps.
Like the Vivax, not all dps report meaningful data, even if the names are
all identified now (and likely match the Vivax unknowns, since all others
seem to match perfectly, and types are consistent)

Issue #1183
Jason Rumney 2 år sedan
förälder
incheckning
62638d4d06
1 ändrade filer med 128 tillägg och 12 borttagningar
  1. 128 12
      custom_components/tuya_local/devices/vivax_heatpump.yaml

+ 128 - 12
custom_components/tuya_local/devices/vivax_heatpump.yaml

@@ -104,36 +104,81 @@ primary_entity:
       # Undocumented but in log
       # Undocumented but in log
     - id: 102
     - id: 102
       type: integer
       type: integer
-      name: unknown_102
+      name: pm25
     - id: 105
     - id: 105
       type: string
       type: string
-      name: unknown_105
-    - id: 106
-      type: boolean
-      name: unknown_106
+      name: air_quality
     - id: 107
     - id: 107
       type: boolean
       type: boolean
-      name: unknown_107
+      name: strong
     - id: 111
     - id: 111
       type: boolean
       type: boolean
-      name: unknown_111
+      name: new_style
     - id: 113
     - id: 113
       type: string
       type: string
-      name: unknown_113
+      name: sense
     - id: 114
     - id: 114
       type: boolean
       type: boolean
-      name: unknown_114
+      name: self_cleaning
     - id: 116
     - id: 116
       type: integer
       type: integer
-      name: unknown_116
+      name: fault_code
       # next two look obviously swing (logged values ud_00 and lr_00),
       # next two look obviously swing (logged values ud_00 and lr_00),
       # but full mappings not available to map to swing mode
       # but full mappings not available to map to swing mode
+      # from #1183, seems to be ud_00, ud_01, ud_02, ud_03, ud_04, ud_0c (last one is swing, others are pos) 
     - id: 117
     - id: 117
       type: string
       type: string
-      name: vertical_swing
+      name: swing_mode
+      mapping:
+        - dps_val: ud_0c
+          constraint: horizontal_swing
+          conditions:
+            - dps_val: lr_0c
+              value: both
+            - dps_val: lr_00
+              value: vertical
+            - value: vertical
+        - dps_val: ud_00
+          constraint: horizontal_swing
+          conditions:
+            - dps_val: lr_0c
+              value: horizontal
+            - dps_val: lr_00
+              value: "off"
+            - value: "off"
+        - constraint: horizontal_swing
+          conditions:
+            - dps_val: lr_0c
+              value: horizontal
+            - value: "off"
     - id: 118
     - id: 118
       type: string
       type: string
       name: horizontal_swing
       name: horizontal_swing
+      # From Tadiran Apollo
+    - id: 101
+      type: boolean
+      name: mood_lighting
+      optional: true
+    - id: 103
+      type: integer
+      name: co2
+      optional: true
+    - id: 104
+      type: integer
+      name: volatile_organic_compounds
+      optional: true
+    - id: 110
+      type: boolean
+      name: heating_10c
+      optional: true
+    - id: 112
+      type: integer
+      name: power
+      optional: true
+    - id: 119
+      type: boolean
+      name: cleaning_56c
+      optional: true
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     name: Emergency heat
     name: Emergency heat
@@ -171,5 +216,76 @@ secondary_entities:
       - id: 108
       - id: 108
         type: boolean
         type: boolean
         name: switch
         name: switch
-
 # Boolean dps 16 = Beep and 109 = Sleep documented but missing from log
 # Boolean dps 16 = Beep and 109 = Sleep documented but missing from log
+  - entity: switch
+    name: Sleep
+    category: config
+    icon: "mdi:power-sleep"
+    dps:
+      - id: 109
+        type: boolean
+        name: switch
+        optional: true
+  - entity: switch
+    name: Health
+    category: config
+    icon: "mdi:shield-bug"
+    dps:
+      - id: 106
+        type: boolean
+        name: switch
+        optional: true
+  - entity: select
+    name: Vertical swing
+    category: config
+    icon: "mdi:arrow-up-down-bold"
+    dps:
+      - id: 117
+        type: string
+        name: option
+        mapping:
+          - dps_val: ud_00
+            value: Top
+          - dps_val: ud_01
+            value: Upper
+          - dps_val: ud_02
+            value: Middle
+          - dps_val: ud_03
+            value: Lower
+          - dps_val: ud_04
+            value: Bottom
+          - dps_val: ud_0c
+            value: Swing
+  - entity: select
+    name: Horizontal swing
+    category: config
+    icon: "mdi:arrow-up-down-bold"
+    dps:
+      - id: 117
+        type: string
+        name: option
+        mapping:
+          - dps_val: lr_00
+            value: Leftmost
+          - dps_val: lr_01
+            value: Left
+          - dps_val: lr_02
+            value: Middle
+          - dps_val: lr_03
+            value: Right
+          - dps_val: lr_04
+            value: Rightmost
+          - dps_val: lr_0c
+            value: Swing
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 116
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true