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

feat(electriq_airflex15w_heatpump): add entities for unknown dps

Based on same dps layout, temperature range and fan speed matches, this and Duux North
seem to be based on the same firmware. Assume unknown dps will match the assignments
from issue #5140, and add problem, sleep, timer entities and swing_mode control for
climate entity.
Unfortunately a mismatch of hvac_modes (Duux North does not support heating, despite
being listed in the dps info) and no model identifier means these configs could
not be merged into one.
Jason Rumney 1 месяц назад
Родитель
Сommit
e423e2207d
1 измененных файлов с 39 добавлено и 10 удалено
  1. 39 10
      custom_components/tuya_local/devices/electriq_airflex15w_heatpump.yaml

+ 39 - 10
custom_components/tuya_local/devices/electriq_airflex15w_heatpump.yaml

@@ -53,9 +53,6 @@ entities:
         range:
         range:
           min: 0
           min: 0
           max: 100
           max: 100
-      - id: 20
-        type: integer
-        name: unknown_20
       - id: 101
       - id: 101
         type: string
         type: string
         # at least some firmware versions of this model do not like combining
         # at least some firmware versions of this model do not like combining
@@ -72,9 +69,6 @@ entities:
             value: Dry
             value: Dry
           - dps_val: "5"
           - dps_val: "5"
             value: Fan
             value: Fan
-      - id: 103
-        type: boolean
-        name: unknown_103
       - id: 104
       - id: 104
         type: string
         type: string
         name: fan_mode
         name: fan_mode
@@ -85,12 +79,14 @@ entities:
             value: medium
             value: medium
           - dps_val: "1"
           - dps_val: "1"
             value: high
             value: high
-      - id: 105
-        type: integer
-        name: unknown_105
       - id: 106
       - id: 106
         type: boolean
         type: boolean
-        name: unknown_106
+        name: swing_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: "on"
       - id: 109
       - id: 109
         type: boolean
         type: boolean
         name: temperature_unit
         name: temperature_unit
@@ -135,3 +131,36 @@ entities:
             value: celsius
             value: celsius
           - dps_val: true
           - dps_val: true
             value: fahrenheit
             value: fahrenheit
+  - 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
+  - entity: switch
+    translation_key: sleep
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 24
+