Răsfoiți Sursa

Atorch S1TW thermostat: avoid fake dps for temperature adjustments

For target_temp_high and low, double redirection is needed to take into account both the unit and mode, but it does not mean we need to fake the to level dp id, as the id can be reused in the config.

- Avoid overriding names and icons unnecessarily.

PR #3147
Jason Rumney 10 luni în urmă
părinte
comite
628d0cb395

+ 6 - 40
custom_components/tuya_local/devices/atorch_s1tw_thermostat.yaml

@@ -55,7 +55,7 @@ entities:
         hidden: true
         hidden: true
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-      - id: 0
+      - id: 104
         type: integer
         type: integer
         name: target_temp_low
         name: target_temp_low
         mapping:
         mapping:
@@ -72,7 +72,7 @@ entities:
                 range:
                 range:
                   min: -40
                   min: -40
                   max: 2480
                   max: 2480
-      - id: 0
+      - id: 104
         type: integer
         type: integer
         name: target_temp_low_c
         name: target_temp_low_c
         hidden: true
         hidden: true
@@ -80,23 +80,15 @@ entities:
           - scale: 10
           - scale: 10
             constraint: hvac_mode
             constraint: hvac_mode
             conditions:
             conditions:
-              - dps_val: hot
-                value_redirect: heating_temp_low_c
               - dps_val: colding
               - dps_val: colding
                 value_redirect: cooling_temp_low_c
                 value_redirect: cooling_temp_low_c
-      - id: 104
-        type: integer
-        name: heating_temp_low_c
-        hidden: true
-        mapping:
-          - scale: 10
       - id: 105
       - id: 105
         type: integer
         type: integer
         name: cooling_temp_low_c
         name: cooling_temp_low_c
         hidden: true
         hidden: true
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-      - id: 0
+      - id: 120
         type: integer
         type: integer
         name: target_temp_low_f
         name: target_temp_low_f
         hidden: true
         hidden: true
@@ -104,23 +96,15 @@ entities:
           - scale: 10
           - scale: 10
             constraint: hvac_mode
             constraint: hvac_mode
             conditions:
             conditions:
-              - dps_val: hot
-                value_redirect: heating_temp_low_f
               - dps_val: colding
               - dps_val: colding
                 value_redirect: cooling_temp_low_f
                 value_redirect: cooling_temp_low_f
-      - id: 120
-        type: integer
-        name: heating_temp_low_f
-        hidden: true
-        mapping:
-          - scale: 10
       - id: 121
       - id: 121
         type: integer
         type: integer
         name: cooling_temp_low_f
         name: cooling_temp_low_f
         hidden: true
         hidden: true
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-      - id: 0
+      - id: 106
         type: integer
         type: integer
         name: target_temp_high
         name: target_temp_high
         mapping:
         mapping:
@@ -137,7 +121,7 @@ entities:
                 range:
                 range:
                   min: -40
                   min: -40
                   max: 2480
                   max: 2480
-      - id: 0
+      - id: 106
         type: integer
         type: integer
         name: target_temp_high_c
         name: target_temp_high_c
         hidden: true
         hidden: true
@@ -145,23 +129,15 @@ entities:
           - scale: 10
           - scale: 10
             constraint: hvac_mode
             constraint: hvac_mode
             conditions:
             conditions:
-              - dps_val: hot
-                value_redirect: heating_temp_high_c
               - dps_val: colding
               - dps_val: colding
                 value_redirect: cooling_temp_high_c
                 value_redirect: cooling_temp_high_c
-      - id: 106
-        type: integer
-        name: heating_temp_high_c
-        hidden: true
-        mapping:
-          - scale: 10
       - id: 107
       - id: 107
         type: integer
         type: integer
         name: cooling_temp_high_c
         name: cooling_temp_high_c
         hidden: true
         hidden: true
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-      - id: 0
+      - id: 122
         type: integer
         type: integer
         name: target_temp_high_f
         name: target_temp_high_f
         hidden: true
         hidden: true
@@ -169,16 +145,8 @@ entities:
           - scale: 10
           - scale: 10
             constraint: hvac_mode
             constraint: hvac_mode
             conditions:
             conditions:
-              - dps_val: hot
-                value_redirect: heating_temp_high_f
               - dps_val: colding
               - dps_val: colding
                 value_redirect: cooling_temp_high_f
                 value_redirect: cooling_temp_high_f
-      - id: 122
-        type: integer
-        name: heating_temp_high_f
-        hidden: true
-        mapping:
-          - scale: 10
       - id: 123
       - id: 123
         type: integer
         type: integer
         name: cooling_temp_high_f
         name: cooling_temp_high_f
@@ -187,7 +155,6 @@ entities:
           - scale: 10
           - scale: 10
   - entity: switch
   - entity: switch
     class: outlet
     class: outlet
-    name: Switch
     dps:
     dps:
       - id: 103
       - id: 103
         type: boolean
         type: boolean
@@ -330,7 +297,6 @@ entities:
   - entity: lock
   - entity: lock
     translation_key: child_lock
     translation_key: child_lock
     category: config
     category: config
-    icon: "mdi:account-lock"
     dps:
     dps:
       - id: 116
       - id: 116
         type: boolean
         type: boolean