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

Plikc Neve: add support for Plikc Neve Pro W

Additional features supported by this model:
  - configurable min and max temperature
  - Anti frost switch and temperature
  - Weekly schedule program (not really supportable)
  - Mode switching - on the original report it was mentioned that the
    thermostat could be switched from heat to cool, but needed shutting
    down to do so. It seems this setting is exposed, but I'm not sure of
    the restrictions so it is not integrated with hvac_mode.
  - an "electricity" reading. Assumed to be power (W) based on the range.
  - PIN protection and partial key lock

These have all been made conditionally available based on whether the
max_temperature dp is reported by the device.

Other change is that the device appears to use "cool" instead of "cold" in
the hvac_action value. Since this is read-only, both values can be listed
without causing any issue.

Issue #2483, PR #2485
Jason Rumney 1 год назад
Родитель
Сommit
175c1ccd50
3 измененных файлов с 282 добавлено и 7 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 1
      DEVICES.md
  3. 280 6
      custom_components/tuya_local/devices/plikc_neve_thermostat.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -740,3 +740,4 @@ Further device support has been made with the assistance of users. Please consid
 - [czarau](https://github.com/czarau) for contributing bugfixes to device connection handling.
 - [broyuken](https://github.com/broyuken) for contributing support for Kilo Plus air purifier.
 - [perimos](https://gituhb.com/perimos) for contributing support for KCvents VT-501 HRV.
+- [Tbaile](https://github.com/Tbaile) for contributing support for Plikc Neve Pro W thermostat.

+ 1 - 1
DEVICES.md

@@ -203,7 +203,7 @@
 - Nashone MTS-700-WB thermostat smartplug
 - Netmostat N-1 (RTAFN1) thermostat
 - Owon PCT513 thermostat
-- Plikc Neve X RFW thermostat
+- Plikc Neve X W/RFW and Neve Pro W thermostats
 - Psmart T436 thermostat
 - RYRA TYTE-D1 thermostat with energy monitoring
 - Salcar T9W thermostat _(likely also Tellur TSH02)_

+ 280 - 6
custom_components/tuya_local/devices/plikc_neve_thermostat.yaml

@@ -4,6 +4,8 @@ products:
     name: Plikc Neve X RFW
   - id: 5kwgvcaqzzkzrftu
     name: Plikc Neve X W
+  - id: 9myqvomgygt9zgcs
+    name: Plikc Neve Pro W
 primary_entity:
   entity: climate
   translation_key: thermostat
@@ -42,13 +44,10 @@ primary_entity:
           value: heating
         - dps_val: cold
           value: cooling
+        - dps_val: cool
+          value: cooling
         - dps_val: "off"
-          constraint: hvac_mode
-          conditions:
-            - dps_val: true
-              value: idle
-            - dps_val: false
-              value: "off"
+          value: idle
     - id: 16
       type: integer
       name: temperature
@@ -62,11 +61,23 @@ primary_entity:
           conditions:
             - dps_val: holiday
               value_redirect: holiday_temp_set
+    - id: 19
+      type: integer
+      optional: true
+      name: max_temperature
+      mapping:
+        - scale: 10
     - id: 24
       type: integer
       name: current_temperature
       mapping:
         - scale: 10
+    - id: 26
+      type: integer
+      optional: true
+      name: min_temperature
+      mapping:
+        - scale: 10
     - id: 32
       type: integer
       name: holiday_temp_set
@@ -109,6 +120,7 @@ secondary_entities:
         range:
           min: 0
           max: 99
+          # Pro model goes to 3000
   - entity: button
     translation_key: factory_reset
     category: config
@@ -135,6 +147,7 @@ secondary_entities:
     dps:
       - id: 42
         type: integer
+        optional: true
         name: sensor
         unit: min
   - entity: binary_sensor
@@ -155,3 +168,264 @@ secondary_entities:
         type: bitfield
         optional: true
         name: fault_code
+  - entity: number
+    name: Temporary time
+    category: config
+    translation_key: timer
+    dps:
+      - id: 101
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 2880
+  - entity: sensor
+    name: Total runtime
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 102
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+        class: measurement
+  - entity: number
+    name: Anti-frost temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 5
+          max: 150
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Temperature hysteresis
+    category: config
+    icon: "mdi:arrow-collapse-vertical"
+    dps:
+      - id: 104
+        type: integer
+        optional: true
+        name: value
+        unit: ⁰
+        range:
+          min: 2
+          max: 20
+        mapping:
+          - scale: 10
+  # Pro only entities
+  - entity: number
+    name: Maximum temperature
+    category: config
+    icon: "mdi:thermometer-chevron-up"
+    dps:
+      - id: 19
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 50
+          max: 350
+        mapping:
+          - scale: 10
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: number
+    name: Minimum temperature
+    category: config
+    icon: "mdi:thermometer-chevron-down"
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 50
+          max: 350
+        mapping:
+          - scale: 10
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    name: Time period
+    category: diagnostic
+    dps:
+      - id: 105
+        type: integer
+        optional: true
+        name: sensor
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 37
+        type: string
+        optional: true
+        name: week_program
+      - id: 107
+        type: string
+        optional: true
+        name: current_program
+  - entity: sensor
+    class: power  # marked as electricity, but range of 0-6000 suggests W
+    category: diagnostic
+    dps:
+      - id: 106
+        type: integer
+        optional: true
+        name: sensor
+        unit: W
+        class: measurement
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: select
+    name: System mode
+    icon: "mdi:help-box-multiple"
+    category: config
+    dps:
+      - id: 108
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: hc_heat
+            value: HC heat
+          - dps_val: hc_cool
+            value: HC cool
+          - dps_val: heat
+            value: Heat
+          - dps_val: cool
+            value: Cool
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 109
+        type: boolean
+        optional: true
+        name: switch
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: switch
+    name: PIN protect
+    icon: "mdi:dialpad"
+    category: config
+    dps:
+      - id: 110
+        type: boolean
+        optional: true
+        name: switch
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: select
+    name: "Off mode"
+    icon: "mdi:power-standby"
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        optional: true
+        name: option
+        mapping:
+          - dps_val: true
+            value: "Power off"
+          - dps_val: false
+            value: "Standby"
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: number
+    name: PIN code
+    category: config
+    icon: "mdi:dialpad"
+    dps:
+      - id: 116
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 0
+          max: 9999
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: lock
+    name: Partial key lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 118
+        type: boolean
+        optional: true
+        name: lock
+      - id: 19
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true