ソースを参照

Poolex Q-7: deprecate water_heater, replace with climate

The original request #777 only mentioned heating ability, and dp 4 was not
listed in the iot.tuya.com info, though the log value ECO_Heat fits with
the presets listed in PR #966 for an otherwise compatible Poolsana model.

Move to a climate entity so both heating and cooling can be controlled,
fill in the presets accoring to our standard pool heatpump presets, and
reduce the temperature range to the Poolsana range that is more reasonable
for pool heatpumps (the 5-80 range seems more suited to hot water systems)
Jason Rumney 2 年 前
コミット
c30710682d
1 ファイル変更111 行追加12 行削除
  1. 111 12
      custom_components/tuya_local/devices/poolex_q7_heatpump.yaml

+ 111 - 12
custom_components/tuya_local/devices/poolex_q7_heatpump.yaml

@@ -1,31 +1,47 @@
-name: Poolex Q-7 pool heatpump
+name: Pool heatpump
 products:
   - id: qhrpnqjhakrn3jvv
+    name: Poolex Qline Q-7
+    # unknown id: Poolsana InverPower
 primary_entity:
-  entity: water_heater
+  entity: climate
   icon: "mdi:pool-thermometer"
+  translation_key: pool_heatpump
   dps:
     - id: 1
       type: boolean
-      name: operation_mode
+      name: hvac_mode
       mapping:
         - dps_val: false
-          value: off
+          value: "off"
         - dps_val: true
-          value: heatpump
+          constraint: preset_mode
+          conditions:
+            - dps_val: Boost_Heat 
+              value: heat
+            - dps_val: Silent_Heat
+              value: heat
+            - dps_val: ECO_Heat
+              value: heat
+            - dps_val: Boost_Cool
+              value: cool
+            - dps_val: Silent_Cool
+              value: cool
+            - dps_val: ECO_Cool
+              value: cool
     - id: 2
       type: integer
       name: temperature
       range:
-        min: 5
-        max: 80
+        min: 20
+        max: 40
       mapping:
         - constraint: temperature_unit
           conditions:
             - dps_val: f
               range:
-                min: 41
-                max: 176
+                min: 68
+                max: 104
               value_redirect: temp_set_f
     - id: 3
       type: integer
@@ -35,6 +51,20 @@ primary_entity:
           conditions:
             - dps_val: f
               value_redirect: temp_current_f
+    - id: 11
+      type: string
+      name: hvac_action
+      mapping:
+        - dps_val: heating
+          value: heating
+        - dps_val: cooling
+          value: cooling
+        - constraint: hvac_mode
+          conditions:
+            - dps_val: false
+              value: "off"
+            - dps_val: true
+              value: idle
     - id: 13
       type: string
       name: temperature_unit
@@ -47,8 +77,8 @@ primary_entity:
       type: integer
       name: temp_set_f
       range:
-        min: 41
-        max: 176
+        min: 68
+        max: 104
       hidden: true
       optional: true
     - id: 15
@@ -58,11 +88,80 @@ primary_entity:
       optional: true
     - id: 4
       type: string
-      name: unknown_4
+      name: preset_mode
+      mapping:
+        - dps_val: Boost_Heat
+          value: quick_heat
+        - dps_val: Silent_Heat
+          value: quiet_heat
+        - dps_val: ECO_Heat
+          value: smart_heat
+        - dps_val: ECO_Cool
+          value: smart_cool
+        - dps_val: Silent_Cool
+          value: quiet_cool
+        - dps_val: Boost_Cool
+          value: quick_cool
     - id: 21
       type: integer
       name: unknown_21
 secondary_entities:
+  - entity: water_heater
+    icon: "mdi:pool-thermometer"
+    deprecated: climate
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: operation_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heatpump
+      - id: 2
+        type: integer
+        name: temperature
+        range:
+          min: 5
+          max: 80
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                range:
+                  min: 41
+                  max: 176
+                value_redirect: temp_set_f
+      - id: 3
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_current_f
+      - id: 13
+        type: string
+        name: temperature_unit
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+      - id: 14
+        type: integer
+        name: temp_set_f
+        range:
+          min: 41
+          max: 176
+        hidden: true
+        optional: true
+      - id: 15
+        type: integer
+        name: temp_current_f
+        hidden: true
+        optional: true
   - entity: select
     name: Temperature unit
     icon: "mdi:temperature-celsius"