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

Thermoval TVT40: fix review comments

Apply most of the review comments.
PR #1421
Jason Rumney 1 год назад
Родитель
Сommit
7eacbbf6f6
1 измененных файлов с 28 добавлено и 85 удалено
  1. 28 85
      custom_components/tuya_local/devices/thermoval_tvt40_thermostat.yaml

+ 28 - 85
custom_components/tuya_local/devices/thermoval_tvt40_thermostat.yaml

@@ -1,7 +1,7 @@
-name: Thermoval WiFi Thermostat
+name: Thermostat
 products:
 products:
   - id: jIRwsT5yLPJO41Po
   - id: jIRwsT5yLPJO41Po
-    name: TVT 40
+    name: Thermoval TVT 40
 primary_entity:
 primary_entity:
   entity: climate
   entity: climate
   translation_key: thermostat
   translation_key: thermostat
@@ -28,32 +28,19 @@ primary_entity:
         - dps_val: Manual
         - dps_val: Manual
           value: manual
           value: manual
           icon: "mdi:cursor-pointer"
           icon: "mdi:cursor-pointer"
-    - id: 4
-      name: fault
-      type: integer
     - id: 5
     - id: 5
-      name: room_temperature
+      name: current_temperature
       type: integer
       type: integer
       mapping:
       mapping:
         - scale: 10
         - scale: 10
-    - id: 6
-      name: floor_temp_limit
-      type: integer
-      mapping:
-        - scale: 10
-    - id: 7
-      name: installation
-      type: boolean
-      mapping:
-        - dps_val: true
-          value: Office
-        - dps_val: false
-          value: Home
+          constraint: sensor_select
+          conditions:
+            - dps_val: "0"
+              value_redirect: floor_temperature
     - id: 8
     - id: 8
       name: floor_temperature
       name: floor_temperature
       type: integer
       type: integer
-      mapping:
-        - scale: 10
+      hidden: true
     - id: 9
     - id: 9
       name: hvac_mode
       name: hvac_mode
       type: boolean
       type: boolean
@@ -63,21 +50,13 @@ primary_entity:
           value: "heat"
           value: "heat"
         - dps_val: true
         - dps_val: true
           value: "cool"
           value: "cool"
-    - id: 10
-      name: adaptive
-      type: boolean
-    - id: 12
-      name: schedule
+    - id: 14
       type: string
       type: string
+      name: sensor_select
+      hidden: true
     - id: 21
     - id: 21
       name: factory_reset
       name: factory_reset
       type: boolean
       type: boolean
-    - id: 22
-      name: power_rating
-      type: integer
-    - id: 23
-      name: power_consumption_duration
-      type: integer
     - id: 24
     - id: 24
       name: hvac_action
       name: hvac_action
       type: string
       type: string
@@ -93,18 +72,27 @@ primary_entity:
       optional: true
       optional: true
       type: integer
       type: integer
 secondary_entities:
 secondary_entities:
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 4
+        name: sensor
+        type: bitfield
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 4
+        name: fault_code
+        type: bitfield
   - entity: lock
   - entity: lock
-    name: Child lock
+    translation_key: child_lock
     category: config
     category: config
     dps:
     dps:
       - id: 11
       - id: 11
         name: lock
         name: lock
         type: boolean
         type: boolean
-        mapping:
-          - dps_val: true
-            icon: "mdi:hand-back-right-off"
-          - dps_val: false
-            icon: "mdi:hand-back-right"
   - entity: number
   - entity: number
     name: Room temperature limit
     name: Room temperature limit
     category: config
     category: config
@@ -133,51 +121,6 @@ secondary_entities:
         unit: C
         unit: C
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-  - entity: select
-    name: Preset mode
-    category: config
-    dps:
-      - id: 3
-        name: option
-        type: string
-        mapping:
-          - dps_val: Smart
-            value: program
-            icon: "mdi:home-thermometer"
-          - dps_val: Anti_frozen
-            value: away
-            icon: "mdi:snowflake-melt"
-          - dps_val: Manual
-            value: manual
-            icon: "mdi:cursor-pointer"
-  - entity: select
-    name: HVAC mode
-    category: config
-    dps:
-      - id: 9
-        name: option
-        type: boolean
-        readonly: true
-        mapping:
-          - dps_val: false
-            value: "heat"
-          - dps_val: true
-            value: "cool"
-  - entity: select
-    name: HVAC action
-    category: config
-    dps:
-      - id: 24
-        name: option
-        type: string
-        readonly: true
-        mapping:
-          - dps_val: Standby
-            value: idle
-          - dps_val: Heating
-            value: heating
-          - dps_val: Cooling
-            value: cooling
   - entity: number
   - entity: number
     name: Floor temperature limit
     name: Floor temperature limit
     category: config
     category: config
@@ -306,10 +249,10 @@ secondary_entities:
   - entity: sensor
   - entity: sensor
     name: Power Consumption Duration
     name: Power Consumption Duration
     category: diagnostic
     category: diagnostic
-    icon: "mdl:clock" 
+    icon: "mdi:clock"
     dps:
     dps:
       - id: 23
       - id: 23
         name: sensor
         name: sensor
         type: integer
         type: integer
         class: measurement
         class: measurement
-        unit: hour
+        unit: h