Преглед изворни кода

Add support PNI CT-36 PRO (#4240)

* added yaml to support PNI CT-36

* Update etop_htch_pro_thermostat.yaml

updated based on feedback

* feat (etop_htch_pro_thermostat): support cooling in climate

- Kept cool/heat as a config option, as it is probably an installation configuration, not something you can switch between at runtime.
- When set to cool, make the climate use cool/cooling instead of heat/heating

PR #4240

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
jonathanm3 пре 1 месец
родитељ
комит
174016e412
1 измењених фајлова са 212 додато и 0 уклоњено
  1. 212 0
      custom_components/tuya_local/devices/etop_htch_pro_thermostat.yaml

+ 212 - 0
custom_components/tuya_local/devices/etop_htch_pro_thermostat.yaml

@@ -0,0 +1,212 @@
+name: Thermostat
+products:
+  - id: qgrid1yqzkhmi7ua
+    manufacturer: PNI
+    model: CT-36 PRO
+entities:
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat
+            available: heating_set
+          - dps_val: true
+            value: cool
+            available: cooling_set
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: manual
+            value: manual
+          - dps_val: eco
+            value: eco
+          - dps_val: auto
+            value: auto
+      - id: 3
+        type: string
+        name: hvac_action
+        mapping:
+          - dps_val: heating
+            value: heating
+            constraint: heating_set
+            conditions:
+              - dps_val: cold
+                value: cooling
+          - value: idle
+      - id: 24
+        type: integer
+        name: current_temperature
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 16
+        type: integer
+        name: temperature
+        unit: C
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 26
+        type: integer
+        name: min_temperature
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 19
+        type: integer
+        name: max_temperature
+        range:
+          min: 50
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 101
+        type: integer
+        optional: true
+        name: dead_zone
+      - id: 102
+        type: string
+        name: heating_set
+        mapping:
+          - dps_val: heat
+            value: true
+          - value: false
+      - id: 102
+        type: string
+        name: cooling_set
+        mapping:
+          - dps_val: cold
+            value: true
+          - value: false
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 10
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    class: window
+    category: diagnostic
+    dps:
+      - id: 3
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: window_opened
+            value: true
+          - value: false
+  - entity: switch
+    name: Window detection
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 8
+        type: boolean
+        optional: true
+        name: switch
+      - id: 8
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 40
+        type: boolean
+        name: lock
+  - entity: number
+    translation_key: minimum_temperature
+    category: config
+    class: temperature
+    mode: slider
+    dps:
+      - id: 26
+        name: value
+        type: integer
+        unit: C
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: number
+    translation_key: maximum_temperature
+    category: config
+    class: temperature
+    mode: slider
+    dps:
+      - id: 19
+        type: integer
+        name: value
+        unit: C
+        range:
+          min: 50
+          max: 1000
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: number
+    translation_key: temperature_calibration
+    category: config
+    dps:
+      - id: 27
+        name: value
+        type: integer
+        unit: °
+        range:
+          min: -100
+          max: 100
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: binary_sensor
+    category: diagnostic
+    class: problem
+    dps:
+      - id: 45
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        name: fault_code
+  - entity: select
+    name: "Control mode"
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 102
+        type: string
+        name: option
+        mapping:
+          - dps_val: heat
+            value: heat
+          - dps_val: cold
+            value: cool