Parcourir la source

Rename some fields for consistency.

primary_device renamed to primary_entity, since in HA device refers to the whole device, and each functional part is an entity.

secondary_devices renamed to secondary_entities for the same reason.

value under conditions changed to dps_val to be consistent with mappings. The values for comparison are also changed to be raw DPS values before any mapping.

value-override under conditions changed to value.  After renaming the above, there is no conflict, so the naming and meaning can be consistent with mappings.
Jason Rumney il y a 4 ans
Parent
commit
256f0438ec

+ 1 - 1
custom_components/tuya_local/devices/andersson_gsh_heater.yaml

@@ -1,6 +1,6 @@
 name: Andersson GSH Heater
 legacy_type: gsh_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".gsh_heater.climate.AnderssonGSHHeater"
   dps:

+ 1 - 1
custom_components/tuya_local/devices/eurom_600_heater.yaml

@@ -1,6 +1,6 @@
 name: Eurom Mon Soleil 600 Heater
 legacy_type: eurom_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".eurom_600_heater.climate.EuromMonSoleil600Heater"
   dps:

+ 1 - 1
custom_components/tuya_local/devices/gardenpac_heatpump.yaml

@@ -1,6 +1,6 @@
 name: GardenPAC Pool Heatpump
 legacy_type: gardenpac_heatpump
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".gardenpac_heatpump.climate.GardenPACPoolHeatpump"
   dps:

+ 2 - 2
custom_components/tuya_local/devices/goldair_dehumidifier.yaml

@@ -1,6 +1,6 @@
 name: Goldair Dehumidifier
 legacy_type: dehumidifier
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".dehumidifier.climate.GoldairDehumidifier"
   dps:
@@ -70,7 +70,7 @@ primary_device:
         icon: "mdi:snowflake-melt"
         icon_priority: 2
       readonly: true
-secondary_devices:
+secondary_entities:
   - entity: light
     legacy_class: ".dehumidifier.light.GoldairDehumifierLedDisplayLight"
     name: Panel Light

+ 8 - 7
custom_components/tuya_local/devices/goldair_fan.yaml

@@ -1,6 +1,6 @@
 name: Goldair Fan
 legacy_type: fan
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".fan.climate.GoldairFan"
   icon: "mdi:fan"
@@ -18,10 +18,11 @@ primary_device:
       range:
         constraint: preset_mode
         conditions:
-          - value: normal
-            min: 1
-            max: 12
-          - value: eco
+          - dps_val: normal
+            range:
+              min: 1
+              max: 12
+          - dps_val: nature
             mapping:
               - dps_val: 4
                 value: low
@@ -29,7 +30,7 @@ primary_device:
                 value: medium
               - dps_val: 12
                 value: high
-          - value: sleep
+          - dps_val: sleep
             mapping:
               - dps_val: 4
                 value: low
@@ -56,7 +57,7 @@ primary_device:
         - dps_val: true
           value: "horizontal"
       name: swing_mode
-secondary_devices:
+secondary_entities:
   - entity: light
     legacy_class: ".fan.light.GoldairFanLedDisplayLight"
     name: Panel Light

+ 2 - 2
custom_components/tuya_local/devices/goldair_geco_heater.yaml

@@ -1,6 +1,6 @@
 name: Goldair GECO Heater
 legacy_type: geco_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".geco_heater.climate.GoldairGECOHeater"
   dps:
@@ -31,7 +31,7 @@ primary_device:
           value: "OK"
       readonly: true
       name: error
-secondary_devices:
+secondary_entities:
   - entity: lock
     legacy_class: ".geco_heater.lock.GoldairGECOHeaterChildLock"
     name: "Child Lock"

+ 2 - 2
custom_components/tuya_local/devices/goldair_gpcv_heater.yaml

@@ -1,6 +1,6 @@
 name: Goldair GPCV Heater
 legacy_type: gpcv_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".gpcv_heater.climate.GoldairGPCVHeater"
   dps:
@@ -39,7 +39,7 @@ primary_device:
         - dps_val: "High"
           value: "High"
       name: preset_mode
-secondary_devices:
+secondary_entities:
   - entity: lock
     legacy_class: ".gpcv_heater.lock.GoldairGPCVHeaterChildLock"
     name: "Child Lock"

+ 7 - 6
custom_components/tuya_local/devices/goldair_gpph_heater.yaml

@@ -1,6 +1,6 @@
 name: Goldair GPPH Heater
 legacy_type: heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".heater.climate.GoldairHeater"
   dps:
@@ -24,10 +24,11 @@ primary_device:
       mapping:
         constraint: preset_mode
         conditions:
-          - value: eco
+          - dps_val: "ECO"
             value-redirect: eco_temperature
-          - value: away
+          - dps_val: "AF"
             invalid: true
+            value: 5
       name: temperature
     - id: 3
       type: integer
@@ -81,13 +82,13 @@ primary_device:
       mapping:
         constraint: preset_mode
         conditions:
-          - value: comfort
+          - dps_val: "C"
             invalid: true
-          - value: away
+          - dps_val: "AF"
             invalid: true
       hidden: true
       name: eco_temperature
-secondary_devices:
+secondary_entities:
   - entity: light
     legacy_class: ".heater.light.GoldairHeaterLedDisplayLight"
     name: Panel Light

+ 2 - 2
custom_components/tuya_local/devices/kogan_heater.yaml

@@ -1,6 +1,6 @@
 name: Kogan Panel Heater
 legacy_type: kogan_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".kogan_heater.climate.KoganHeater"
   dps:
@@ -35,7 +35,7 @@ primary_device:
     - id: 8
       type: integer
       name: timer
-secondary_devices:
+secondary_entities:
   - entity: lock
     legacy_class: ".kogan_heater.lock.KoganHeaterChildLock"
     name: "Child Lock"

+ 1 - 1
custom_components/tuya_local/devices/kogan_switch.yaml

@@ -1,6 +1,6 @@
 name: Kogan Smart Switch
 legacy_type: kogan_switch
-primary_device:
+primary_entity:
   entity: switch
   legacy_class: ".kogan_socket.switch.KoganSocketSwitch"
   class: outlet

+ 1 - 1
custom_components/tuya_local/devices/kogan_switch2.yaml

@@ -1,6 +1,6 @@
 name: Kogan Smart Switch v2
 legacy_type: kogan_switch
-primary_device:
+primary_entity:
   entity: switch
   legacy_class: ".kogan_socket.switch.KoganSocketSwitch"
   class: outlet

+ 4 - 5
custom_components/tuya_local/devices/purline_m100_heater.yaml

@@ -1,6 +1,6 @@
 name: Purline Hoti M100 Heater
 legacy_type: purline_m100_heater
-primary_device:
+primary_entity:
   entity: climate
   legacy_class: ".purline_m100_heater.climate.PurlineM100Heater"
   dps:
@@ -15,11 +15,10 @@ primary_device:
         - dps_val: true
           constraint: preset_mode
           conditions:
-            - value: Fan
-              value-override: fan_only
+            - dps_val: "off"
+              value: fan_only
               icon: "mdi:fan"
               icon_priority: 2
-          value: 
           value: "heat"
           icon: "mdi:radiator"
           icon_priority: 3
@@ -66,7 +65,7 @@ primary_device:
           value: "off"
         - dps_val: true
           value: "vertical"
-secondary_devices:
+secondary_entities:
   - entity: light
     legacy_class: ".purline_m100_heater.light.PurlineM100HeaterLedDisplayLight"
     name: Panel Light