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

fix(water_air heatpumps): do not make up new operation modes

water_heater documentation was updated to specify that integrations
must only use the predefined operation modes. We had already defined
a translation_key for water_air heatpumps, with our own defined modes.

- limit the operation_mode to "off" and "heat_pump",
- use a separate select entity to set the heat_pump_mode instead.
- move the translations to the new select translation_key.

Related to #1708 and also the earlier change for kettles associated
with PR #3301.
Jason Rumney 7 месяцев назад
Родитель
Сommit
18a5e1533d
29 измененных файлов с 433 добавлено и 414 удалено
  1. 20 11
      custom_components/tuya_local/devices/axen_ks100w_heatpump.yaml
  2. 19 16
      custom_components/tuya_local/devices/hy_combo_heatpump.yaml
  3. 12 8
      custom_components/tuya_local/devices/nulite_nlb245_heatpump.yaml
  4. 19 16
      custom_components/tuya_local/devices/powerworld_pw040_waterheatpump.yaml
  5. 19 16
      custom_components/tuya_local/devices/powerworld_pw58330_waterheater.yaml
  6. 19 16
      custom_components/tuya_local/devices/powerworld_pw58410_hvaconly.yaml
  7. 19 16
      custom_components/tuya_local/devices/powerworld_pw58410_waterheater.yaml
  8. 12 0
      custom_components/tuya_local/icons.json
  9. 14 15
      custom_components/tuya_local/translations/bg.json
  10. 14 15
      custom_components/tuya_local/translations/ca.json
  11. 14 15
      custom_components/tuya_local/translations/cz.json
  12. 14 15
      custom_components/tuya_local/translations/de.json
  13. 14 15
      custom_components/tuya_local/translations/el.json
  14. 14 15
      custom_components/tuya_local/translations/en.json
  15. 14 15
      custom_components/tuya_local/translations/es.json
  16. 14 15
      custom_components/tuya_local/translations/fr.json
  17. 14 15
      custom_components/tuya_local/translations/hu.json
  18. 14 15
      custom_components/tuya_local/translations/id.json
  19. 14 15
      custom_components/tuya_local/translations/it.json
  20. 14 15
      custom_components/tuya_local/translations/ja.json
  21. 14 15
      custom_components/tuya_local/translations/no-NB.json
  22. 14 15
      custom_components/tuya_local/translations/pl.json
  23. 14 15
      custom_components/tuya_local/translations/pt-BR.json
  24. 14 15
      custom_components/tuya_local/translations/pt-PT.json
  25. 14 15
      custom_components/tuya_local/translations/ru.json
  26. 14 15
      custom_components/tuya_local/translations/uk.json
  27. 14 15
      custom_components/tuya_local/translations/ur.json
  28. 14 15
      custom_components/tuya_local/translations/zh-Hans.json
  29. 14 15
      custom_components/tuya_local/translations/zh-Hant.json

+ 20 - 11
custom_components/tuya_local/devices/axen_ks100w_heatpump.yaml

@@ -165,7 +165,12 @@ entities:
     dps:
       - id: 1
         type: boolean
-        name: available
+        name: operation_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat_pump
       - id: 104
         type: integer
         name: temperature
@@ -181,9 +186,21 @@ entities:
         name: current_temperature
         mapping:
           - scale: 10
+      - id: 165
+        type: boolean
+        optional: true
+        name: away_mode
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
       - id: 109
         type: string
-        name: operation_mode
+        name: option
         mapping:
           - dps_val: cool
             value: cool
@@ -198,15 +215,7 @@ entities:
           - dps_val: heat_hot_water
             value: hotwater_heat
           - dps_val: auto_dhw
-            value: hotwater_auto
-      - id: 165
-        type: boolean
-        optional: true
-        name: away_mode
-        mapping:
-          - dps_val: null
-            value: false
-            hidden: true
+            value: hotwater_auto            
   - entity: sensor
     name: Inlet temperature
     class: temperature

+ 19 - 16
custom_components/tuya_local/devices/hy_combo_heatpump.yaml

@@ -89,22 +89,7 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: mode
-            conditions:
-              - dps_val: Hot
-                value: hotwater
-              - dps_val: Heating
-                value: heat
-              - dps_val: Cooling
-                value: cool
-              - dps_val: Hot_Heating
-                value: hotwater_heat
-              - dps_val: Hot_Cooling
-                value: hotwater_cool
-      - id: 2
-        type: string
-        name: mode
-        hidden: true
+            value: heat_pump
       - id: 119
         type: integer
         name: temperature
@@ -117,6 +102,24 @@ entities:
         name: current_temperature
         mapping:
           - scale: 10
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 2
+        type: string
+        name: option
+        mapping:
+          - dps_val: Hot
+            value: hotwater
+          - dps_val: Heating
+            value: heat
+          - dps_val: Cooling
+            value: cool
+          - dps_val: Hot_Heating
+            value: hotwater_heat
+          - dps_val: Hot_Cooling
+            value: hotwater_cool
   - entity: switch
     name: Night mode
     icon: "mdi:weather-night"

+ 12 - 8
custom_components/tuya_local/devices/nulite_nlb245_heatpump.yaml

@@ -77,10 +77,21 @@ entities:
         name: fault_code
   - entity: water_heater
     translation_only_key: water_air
+    dps:
+      - id: 101
+        type: integer
+        name: temperature
+        unit: C
+        range:
+          min: 20
+          max: 50
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
     dps:
       - id: 4
         type: string
-        name: operation_mode
+        name: option
         mapping:
           - dps_val: Heat
             value: heat
@@ -92,10 +103,3 @@ entities:
             value: hotwater_heat
           - dps_val: Cool_HotWater
             value: hotwater_cool
-      - id: 101
-        type: integer
-        name: temperature
-        unit: C
-        range:
-          min: 20
-          max: 50

+ 19 - 16
custom_components/tuya_local/devices/powerworld_pw040_waterheatpump.yaml

@@ -14,22 +14,7 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: work_mode
-            conditions:
-              - dps_val: heat
-                value: heat
-              - dps_val: wth
-                value: hotwater
-              - dps_val: cool
-                value: cool
-              - dps_val: wth_heat
-                value: hotwater_heat
-              - dps_val: wth_cool
-                value: hotwater_cool
-      - id: 5
-        type: string
-        name: work_mode
-        hidden: true
+            value: heat_pump
       - id: 125
         type: integer
         name: temperature
@@ -48,6 +33,24 @@ entities:
         range:
           min: 0
           max: 9999
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 5
+        type: string
+        name: option
+        mapping:
+          - dps_val: heat
+            value: heat
+          - dps_val: wth
+            value: hotwater
+          - dps_val: cool
+            value: cool
+          - dps_val: wth_heat
+            value: hotwater_heat
+          - dps_val: wth_cool
+            value: hotwater_cool
   - entity: climate
     dps:
       - id: 1

+ 19 - 16
custom_components/tuya_local/devices/powerworld_pw58330_waterheater.yaml

@@ -17,22 +17,7 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: work_mode
-            conditions:
-              - dps_val: wth
-                value: hotwater
-              - dps_val: heat
-                value: heat
-              - dps_val: cool
-                value: cool
-              - dps_val: wth_heat
-                value: hotwater_heat
-              - dps_val: wth_cool
-                value: hotwater_cool
-      - id: 5
-        type: string
-        name: work_mode
-        hidden: true
+            value: heat_pump
       - id: 6
         type: string
         name: temperature_unit
@@ -71,6 +56,24 @@ entities:
         type: string
         optional: true
         name: parameter_group_7
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 5
+        type: string
+        name: option
+        mapping:
+          - dps_val: wth
+            value: hotwater
+          - dps_val: heat
+            value: heat
+          - dps_val: cool
+            value: cool
+          - dps_val: wth_heat
+            value: hotwater_heat
+          - dps_val: wth_cool
+            value: hotwater_cool
   - entity: climate
     translation_key: heater
     dps:

+ 19 - 16
custom_components/tuya_local/devices/powerworld_pw58410_hvaconly.yaml

@@ -78,22 +78,7 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: work_mode
-            conditions:
-              - dps_val: wth
-                value: hotwater
-              - dps_val: heat
-                value: heat
-              - dps_val: cool
-                value: cool
-              - dps_val: wth_heat
-                value: hotwater_heat
-              - dps_val: wth_cool
-                value: hotwater_cool
-      - id: 5
-        type: string
-        name: work_mode
-        hidden: true
+            value: heat_pump
       - id: 6
         type: string
         name: temperature_unit
@@ -151,6 +136,24 @@ entities:
         type: string
         optional: true
         name: power_statistics
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 5
+        type: string
+        name: option
+        mapping:
+          - dps_val: wth
+            value: hotwater
+          - dps_val: heat
+            value: heat
+          - dps_val: cool
+            value: cool
+          - dps_val: wth_heat
+            value: hotwater_heat
+          - dps_val: wth_cool
+            value: hotwater_cool
   - entity: select
     translation_key: temperature_unit
     category: config

+ 19 - 16
custom_components/tuya_local/devices/powerworld_pw58410_waterheater.yaml

@@ -14,22 +14,7 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: work_mode
-            conditions:
-              - dps_val: wth
-                value: hotwater
-              - dps_val: heat
-                value: heat
-              - dps_val: cool
-                value: cool
-              - dps_val: wth_heat
-                value: hotwater_heat
-              - dps_val: wth_cool
-                value: hotwater_cool
-      - id: 5
-        type: string
-        name: work_mode
-        hidden: true
+            value: heat_pump
       - id: 6
         type: string
         name: temperature_unit
@@ -87,6 +72,24 @@ entities:
         type: string
         optional: true
         name: power_statistics
+  - entity: select
+    translation_key: heat_pump_mode
+    category: config
+    dps:
+      - id: 5
+        type: string
+        name: option
+        mapping:
+          - dps_val: wth
+            value: hotwater
+          - dps_val: heat
+            value: heat
+          - dps_val: cool
+            value: cool
+          - dps_val: wth_heat
+            value: hotwater_heat
+          - dps_val: wth_cool
+            value: hotwater_cool
   - entity: climate
     dps:
       - id: 2

+ 12 - 0
custom_components/tuya_local/icons.json

@@ -164,6 +164,18 @@
                     "gbp": "mdi:currency-gbp"
                 }
             },
+            "heat_pump_mode": {
+                "default": "mdi:heat-pump",
+                "state": {
+                    "heat": "mdi:fire",
+                    "cool": "mdi:snowflake",
+                    "auto": "mdi:auto-mode",
+                    "hotwater": "mdi:water-boiler",
+                    "hotwater_heat": "mdi:fire-circle",
+                    "hotwater_cool": "mdi:snowflake-melt",
+                    "hotwater_auto": "mdi:water-boiler"
+                }
+            },
             "initial_state": {
                 "default": "mdi:toggle-switch"
             },

+ 14 - 15
custom_components/tuya_local/translations/bg.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Режим на топлинна помпа",
+                "state": {
+                    "heat": "Нагряване",
+                    "cool": "Охлаждане",
+                    "auto": "Автоматично",
+                    "off": "Изключено",
+                    "hotwater": "Гореща вода",
+                    "hotwater_cool": "Гореща вода и охлаждане",
+                    "hotwater_heat": "Гореща вода и отопление",
+                    "hotwater_auto": "Гореща вода и автоматично"
+                }
+            },
             "initial_state": {
                 "name": "Начално състояние",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Нагревател на вода",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Нагряване",
-                            "cool": "Охлаждане",
-                            "auto": "Автоматично",
-                            "off": "Изключено",
-                            "hotwater": "Гореща вода",
-                            "hotwater_cool": "Гореща вода и охлаждане",
-                            "hotwater_heat": "Гореща вода и отопление",
-                            "hotwater_auto": "Гореща вода и автоматично"
-                        }
-                    }
-                }
+                "name": "Нагревател на вода"
             },
             "kettle": {
                 "name": "Кана"

+ 14 - 15
custom_components/tuya_local/translations/ca.json

@@ -555,6 +555,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Mode de bomba de calor",
+                "state": {
+                    "heat": "Escalfament",
+                    "cool": "Refredament",
+                    "auto": "Automàtic",
+                    "off": "Apagat",
+                    "hotwater": "Aigua calenta",
+                    "hotwater_cool": "Aigua calenta i refredament",
+                    "hotwater_heat": "Aigua calenta i escalfament",
+                    "hotwater_auto": "Aigua calenta i automàtic"
+                }
+            },
             "initial_state": {
                 "name": "Estat inicial",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Escalfador d'aigua",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Escalfament",
-                            "cool": "Refredament",
-                            "auto": "Automàtic",
-                            "off": "Apagat",
-                            "hotwater": "Aigua calenta",
-                            "hotwater_cool": "Aigua calenta i refredament",
-                            "hotwater_heat": "Aigua calenta i escalfament",
-                            "hotwater_auto": "Aigua calenta i automàtic"
-                        }
-                    }
-                }
+                "name": "Escalfador d'aigua"
             },
             "kettle": {
                 "name": "Bullidor d'aigua"

+ 14 - 15
custom_components/tuya_local/translations/cz.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Režim tepelného čerpadla",
+                "state": {
+                    "heat": "Ohřátí",
+                    "cool": "Chlazení",
+                    "auto": "Auto",
+                    "off": "Vypnuto",
+                    "hotwater": "Horká voda",
+                    "hotwater_cool": "Horká voda chlazení",
+                    "hotwater_heat": "Horká voda ohřátí",
+                    "hotwater_auto": "Horká voda auto"
+                }
+            },
             "initial_state": {
                 "name": "Počáteční stav",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Ohřívač vody",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Ohřátí",
-                            "cool": "Chlazení",
-                            "auto": "Auto",
-                            "off": "Vypnuto",
-                            "hotwater": "Horká voda",
-                            "hotwater_cool": "Horká voda chlazení",
-                            "hotwater_heat": "Horká voda ohřátí",
-                            "hotwater_auto": "Horká voda auto"
-                        }
-                    }
-                }
+                "name": "Ohřívač vody"
             },
             "kettle": {
                 "name": "Konvice"

+ 14 - 15
custom_components/tuya_local/translations/de.json

@@ -419,6 +419,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Wärmepumpenmodus",
+                "state": {
+                    "heat": "Heizen",
+                    "cool": "Kühlen",
+                    "auto": "Auto",
+                    "off": "Aus",
+                    "hotwater": "Warmwasser",
+                    "hotwater_cool": "Warmwasser Kühlen",
+                    "hotwater_heat": "Warmwasser Heizen",
+                    "hotwater_auto": "Warmwasser Auto"
+                }
+            },
             "initial_state": {
                 "name": "Startzustand",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Wasserkocher",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Heizen",
-                            "cool": "Kühlen",
-                            "auto": "Auto",
-                            "off": "Aus",
-                            "hotwater": "Warmwasser",
-                            "hotwater_cool": "Warmwasser Kühlen",
-                            "hotwater_heat": "Warmwasser Heizen",
-                            "hotwater_auto": "Warmwasser Auto"
-                        }
-                    }
-                }
+                "name": "Wasserkocher"
             },
             "kettle": {
                 "name": "Wasserkocher"

+ 14 - 15
custom_components/tuya_local/translations/el.json

@@ -420,6 +420,19 @@
                     "gbp": "Λίρα Στερλίνα"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Λειτουργία αντλίας θερμότητας",
+                "state": {
+                    "heat": "Θέρμανση",
+                    "cool": "Ψύξη",
+                    "auto": "Αυτόματο",
+                    "off": "Απενεργοποίηση",
+                    "hotwater": "Ζεστό νερό",
+                    "hotwater_cool": "Ζεστό νερό και ψύξη",
+                    "hotwater_heat": "Ζεστό νερό και θέρμανση",
+                    "hotwater_auto": "Αυτόματο ζεστό νερό"
+                }
+            },
             "initial_state": {
                 "name": "Αρχική κατάσταση",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Θερμοσίφωνας",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Θέρμανση",
-                            "cool": "Ψύξη",
-                            "auto": "Αυτόματο",
-                            "off": "Απενεργοποίηση",
-                            "hotwater": "Ζεστό νερό",
-                            "hotwater_cool": "Ζεστό νερό και ψύξη",
-                            "hotwater_heat": "Ζεστό νερό και θέρμανση",
-                            "hotwater_auto": "Αυτόματο ζεστό νερό"
-                        }
-                    }
-                }
+                "name": "Θερμοσίφωνας"
             },
             "kettle": {
                 "name": "Βραστήρας"

+ 14 - 15
custom_components/tuya_local/translations/en.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Heat pump mode",
+                "state": {
+                    "off": "Off",
+                    "heat": "Heat",
+                    "cool": "Cool",
+                    "auto": "Auto",
+                    "hotwater": "Hot water",
+                    "hotwater_cool": "Hot water & Cool",
+                    "hotwater_heat": "Hot water & Heat",
+                    "hotwater_auto": "Hot water & Auto"
+                }
+            },
             "initial_state": {
                 "name": "Initial state",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Water heater",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "off": "Off",
-                            "heat": "Heat",
-                            "cool": "Cool",
-                            "auto": "Auto",
-                            "hotwater": "Hot water",
-                            "hotwater_cool": "Hot water & Cool",
-                            "hotwater_heat": "Hot water & Heat",
-                            "hotwater_auto": "Hot water & Auto"
-                        }
-                    }
-                }
+                "name": "Water heater"
             },
             "kettle": {
                 "name": "Kettle"

+ 14 - 15
custom_components/tuya_local/translations/es.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Modo de bomba de calor",
+                "state": {
+                    "cool": "Enfriar",
+                    "heat": "Calentar",
+                    "auto": "Auto",
+                    "off": "Apagar",
+                    "hotwater": "Agua caliente",
+                    "hotwater_cool": "Agua caliente y enfriar",
+                    "hotwater_heat": "Agua caliente y calentar",
+                    "hotwater_auto": "Agua caliente y auto"
+                }
+            },
             "initial_state": {
                 "name": "Estado inicial",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Calentador de agua",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Calor",
-                            "cool": "Frío",
-                            "auto": "Automático",
-                            "off": "Apagar",
-                            "hotwater": "Agua caliente",
-                            "hotwater_cool": "Agua caliente y frío",
-                            "hotwater_heat": "Agua caliente y calor",
-                            "hotwater_auto": "Agua caliente y automático"
-                        }
-                    }
-                }
+                "name": "Calentador de agua"
             },
             "kettle": {
                 "name": "Hervidor"

+ 14 - 15
custom_components/tuya_local/translations/fr.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Mode de pompe à chaleur",
+                "state": {
+                    "heat": "Chauffage",
+                    "cool": "Refroidissement",
+                    "auto": "Auto",
+                    "off": "Éteint",
+                    "hotwater": "Eau chaude",
+                    "hotwater_cool": "Eau chaude et refroidissement",
+                    "hotwater_heat": "Eau chaude et chauffage",
+                    "hotwater_auto": "Eau chaude et auto"
+                }
+            },
             "initial_state": {
                 "name": "État initial",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Chauffe-eau",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Chauffage",
-                            "cool": "Refroidissement",
-                            "auto": "Auto",
-                            "off": "Éteint",
-                            "hotwater": "Eau chaude",
-                            "hotwater_cool": "Eau chaude et refroidissement",
-                            "hotwater_heat": "Eau chaude et chauffage",
-                            "hotwater_auto": "Eau chaude et auto"
-                        }
-                    }
-                }
+                "name": "Chauffe-eau"
             },
             "kettle": {
                 "name": "Bouilloire"

+ 14 - 15
custom_components/tuya_local/translations/hu.json

@@ -421,6 +421,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Hőszivattyú mód",
+                "state": {
+                    "heat": "Fűtés",
+                    "cool": "Hűtés",
+                    "auto": "Auto",
+                    "off": "Ki",
+                    "hotwater": "Meleg víz",
+                    "hotwater_cool": "Meleg víz és hűtés",
+                    "hotwater_heat": "Meleg víz és fűtés",
+                    "hotwater_auto": "Meleg víz és automatikus"
+                }
+            },
             "initial_state": {
                 "name": "Kezdeti állapot",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Vízmelegítő",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Fűtés",
-                            "cool": "Hűtés",
-                            "auto": "Auto",
-                            "off": "Ki",
-                            "hotwater": "Meleg víz",
-                            "hotwater_cool": "Meleg víz és hűtés",
-                            "hotwater_heat": "Meleg víz és fűtés",
-                            "hotwater_auto": "Meleg víz és automatikus"
-                        }
-                    }
-                }
+                "name": "Vízmelegítő"
             },
             "kettle": {
                 "name": "Vízforraló"

+ 14 - 15
custom_components/tuya_local/translations/id.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Mode pompa panas",
+                "state": {
+                    "heat": "Pemanas",
+                    "cool": "Pendingin",
+                    "auto": "Otomatis",
+                    "off": "Mati",
+                    "hotwater": "Air panas",
+                    "hotwater_cool": "Pendingin air panas",
+                    "hotwater_heat": "Pemanas air panas",
+                    "hotwater_auto": "Otomatis air panas"
+                }
+            },
             "initial_state": {
                 "name": "Status awal",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Pemanas air",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Pemanas",
-                            "cool": "Pendingin",
-                            "auto": "Otomatis",
-                            "off": "Mati",
-                            "hotwater": "Air panas",
-                            "hotwater_cool": "Pendingin air panas",
-                            "hotwater_heat": "Pemanas air panas",
-                            "hotwater_auto": "Otomatis air panas"
-                        }
-                    }
-                }
+                "name": "Pemanas air"
             },
             "kettle": {
                 "name": "Ketel"

+ 14 - 15
custom_components/tuya_local/translations/it.json

@@ -421,6 +421,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Modalità pompa di calore",
+                "state": {
+                    "heat": "Riscaldamento",
+                    "cool": "Raffreddamento",
+                    "auto": "Auto",
+                    "off": "Spento",
+                    "hotwater": "Acqua calda",
+                    "hotwater_cool": "Acqua calda e raffreddamento",
+                    "hotwater_heat": "Acqua calda e riscaldamento",
+                    "hotwater_auto": "Acqua calda e auto"
+                }
+            },
             "initial_state": {
                 "name": "Stato iniziale",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Scaldabagno",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Riscaldamento",
-                            "cool": "Raffreddamento",
-                            "auto": "Auto",
-                            "off": "Spento",
-                            "hotwater": "Acqua calda",
-                            "hotwater_cool": "Acqua calda e raffreddamento",
-                            "hotwater_heat": "Acqua calda e riscaldamento",
-                            "hotwater_auto": "Acqua calda e auto"
-                        }
-                    }
-                }
+                "name": "Scaldabagno"
             },
             "kettle": {
                 "name": "Bollitore"

+ 14 - 15
custom_components/tuya_local/translations/ja.json

@@ -420,6 +420,19 @@
                     "gbp": "英国ポンド"
                 }
             },
+            "heat_pump_mode": {
+                "name": "ヒートポンプモード",
+                "state": {
+                    "heat": "加熱",
+                    "cool": "冷却",
+                    "auto": "自動",
+                    "off": "オフ",
+                    "hotwater": "給湯",
+                    "hotwater_cool": "給湯冷却",
+                    "hotwater_heat": "給湯加熱",
+                    "hotwater_auto": "給湯自動"
+                }
+            },
             "initial_state": {
                 "name": "初期状態",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "給湯器",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "加熱",
-                            "cool": "冷却",
-                            "auto": "自動",
-                            "off": "オフ",
-                            "hotwater": "給湯",
-                            "hotwater_cool": "給湯冷却",
-                            "hotwater_heat": "給湯加熱",
-                            "hotwater_auto": "給湯自動"
-                        }
-                    }
-                }
+                "name": "給湯器"
             },
             "kettle": {
                 "name": "ケトル"

+ 14 - 15
custom_components/tuya_local/translations/no-NB.json

@@ -421,6 +421,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Varme pumpe modus",
+                "state": {
+                    "heat": "Varm",
+                    "cool": "Kald",
+                    "auto": "Auto",
+                    "off": "Av",
+                    "hotwater": "Varmt vann",
+                    "hotwater_cool": "Varmt vann og kald",
+                    "hotwater_heat": "Varmt vann og varmt",
+                    "hotwater_auto": "Varmt vann og auto"
+                }
+            },
             "initial_state": {
                 "name": "Starttilstand",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Vannvarmer",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Varm",
-                            "cool": "Kald",
-                            "auto": "Auto",
-                            "off": "Av",
-                            "hotwater": "Varmt vann",
-                            "hotwater_cool": "Varmt vann og kald",
-                            "hotwater_heat": "Varmt vann og varmt",
-                            "hotwater_auto": "Varmt vann og auto"
-                        }
-                    }
-                }
+                "name": "Vannvarmer"
             },
             "kettle": {
                 "name": "Vannkoker"

+ 14 - 15
custom_components/tuya_local/translations/pl.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Tryb pompy ciepła",
+                "state": {
+                    "heat": "Ogrzewanie",
+                    "cool": "Chłodzenie",
+                    "auto": "Auto",
+                    "off": "Wyłączony",
+                    "hotwater": "Podgrzewanie wody",
+                    "hotwater_cool": "Podgrzewanie wody i chłodzenie",
+                    "hotwater_heat": "Podgrzewanie wody i ogrzewanie",
+                    "hotwater_auto": "Podgrzewanie wody i auto"
+                }
+            },
             "initial_state": {
                 "name": "Stan początkowy",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Podgrzewacz wody",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Ogrzewanie",
-                            "cool": "Chłodzenie",
-                            "auto": "Auto",
-                            "off": "Wyłączony",
-                            "hotwater": "Podgrzewanie wody",
-                            "hotwater_cool": "Podgrzewanie wody i chłodzenie",
-                            "hotwater_heat": "Podgrzewanie wody i ogrzewanie",
-                            "hotwater_auto": "Podgrzewanie wody i auto"
-                        }
-                    }
-                }
+                "name": "Podgrzewacz wody"
             },
             "kettle": {
                 "name": "Czajnik"

+ 14 - 15
custom_components/tuya_local/translations/pt-BR.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Modo da bomba de calor",
+                "state": {
+                    "heat": "Aquecimento",
+                    "cool": "Resfriamento",
+                    "auto": "Automático",
+                    "off": "Desligado",
+                    "hotwater": "Água quente",
+                    "hotwater_cool": "Água quente e resfriamento",
+                    "hotwater_heat": "Aquecimento de água quente",
+                    "hotwater_auto": "Água quente automática"
+                }
+            },
             "initial_state": {
                 "name": "Estado inicial",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Aquecedor de água",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Aquecimento",
-                            "cool": "Resfriamento",
-                            "auto": "Automático",
-                            "off": "Desligado",
-                            "hotwater": "Água quente",
-                            "hotwater_cool": "Água quente e resfriamento",
-                            "hotwater_heat": "Aquecimento de água quente",
-                            "hotwater_auto": "Água quente automática"
-                        }
-                    }
-                }
+                "name": "Aquecedor de água"
             },
             "kettle": {
                 "name": "Chaleira"

+ 14 - 15
custom_components/tuya_local/translations/pt-PT.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Modo da bomba de calor",
+                "state": {
+                    "heat": "Aquecimento",
+                    "cool": "Arrefecimento",
+                    "auto": "Automático",
+                    "off": "Desligado",
+                    "hotwater": "Água quente",
+                    "hotwater_cool": "Água quente e resfriamento",
+                    "hotwater_heat": "Água quente e aquecimento",
+                    "hotwater_auto": "Água quente e automática"
+                }
+            },
             "initial_state": {
                 "name": "Estado inicial",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Aquecedor de água",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Aquecimento",
-                            "cool": "Arrefecimento",
-                            "auto": "Automático",
-                            "off": "Desligado",
-                            "hotwater": "Água quente",
-                            "hotwater_cool": "Água quente e resfriamento",
-                            "hotwater_heat": "Água quente e aquecimento",
-                            "hotwater_auto": "Água quente e automática"
-                        }
-                    }
-                }
+                "name": "Aquecedor de água"
             },
             "kettle": {
                 "name": "Chaleira"

+ 14 - 15
custom_components/tuya_local/translations/ru.json

@@ -420,6 +420,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Режим теплового насоса",
+                "state": {
+                    "heat": "Нагрев",
+                    "cool": "Охлаждение",
+                    "auto": "Авто",
+                    "off": "Выкл",
+                    "hotwater": "Горячая вода",
+                    "hotwater_cool": "Горячая вода и охлаждение",
+                    "hotwater_heat": "Горячая вода и нагрев",
+                    "hotwater_auto": "Горячая вода и авто"
+                }
+            },
             "initial_state": {
                 "name": "Начальное состояние",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Водонагреватель",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Нагрев",
-                            "cool": "Охлаждение",
-                            "auto": "Авто",
-                            "off": "Выкл",
-                            "hotwater": "Горячая вода",
-                            "hotwater_cool": "Горячая вода и охлаждение",
-                            "hotwater_heat": "Горячая вода и нагрев",
-                            "hotwater_auto": "Горячая вода и авто"
-                        }
-                    }
-                }
+                "name": "Водонагреватель"
             },
             "kettle": {
                 "name": "Чайник"

+ 14 - 15
custom_components/tuya_local/translations/uk.json

@@ -423,6 +423,19 @@
                     "gbp": "GBP"
                 }
             },
+            "heat_pump_mode": {
+                "name": "Режим теплового насоса",
+                "state": {
+                    "heat": "Нагрівання",
+                    "cool": "Охолодження",
+                    "auto": "Авто",
+                    "off": "Вимк",
+                    "hotwater": "Гаряча вода",
+                    "hotwater_cool": "Гаряча вода та охолодження",
+                    "hotwater_heat": "Гаряча вода та нагрівання",
+                    "hotwater_auto": "Гаряча вода та авто"
+                }
+            },
             "initial_state": {
                 "name": "Початковий стан",
                 "state": {
@@ -798,21 +811,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "Водонагрівач",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "Нагрівання",
-                            "cool": "Охолодження",
-                            "auto": "Авто",
-                            "off": "Вимк",
-                            "hotwater": "Гаряча вода",
-                            "hotwater_cool": "Гаряча вода та охолодження",
-                            "hotwater_heat": "Гаряча вода та нагрівання",
-                            "hotwater_auto": "Гаряча вода та авто"
-                        }
-                    }
-                }
+                "name": "Водонагрівач"
             },
             "kettle": {
                 "name": "Чайник"

+ 14 - 15
custom_components/tuya_local/translations/ur.json

@@ -423,6 +423,19 @@
                     "gbp": "برطانوی پاؤنڈ"
                 }
             },
+            "heat_pump_mode": {
+                "name": "ہیٹ پمپ موڈ",
+                "state": {
+                    "heat": "گرم",
+                    "cool": "ٹھنڈا",
+                    "auto": "خود کار",
+                    "off": "آف",
+                    "hotwater": "گرم پانی",
+                    "hotwater_cool": "گرم پانی اور ٹھنڈا",
+                    "hotwater_heat": "گرم پانی اور گرم",
+                    "hotwater_auto": "گرم پانی اور خود کار"
+                }
+            },
             "initial_state": {
                 "name": "ابتدائی حالت",
                 "state": {
@@ -798,21 +811,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "پانی کا ہیٹر",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "گرم",
-                            "cool": "ٹھنڈا",
-                            "auto": "خود کار",
-                            "off": "آف",
-                            "hotwater": "گرم پانی",
-                            "hotwater_cool": "گرم پانی اور ٹھنڈا",
-                            "hotwater_heat": "گرم پانی اور گرم",
-                            "hotwater_auto": "گرم پانی اور خود کار"
-                        }
-                    }
-                }
+                "name": "پانی کا ہیٹر"
             },
             "kettle": {
                 "name": "کیٹل"

+ 14 - 15
custom_components/tuya_local/translations/zh-Hans.json

@@ -420,6 +420,19 @@
                     "gbp": "英镑"
                 }
             },
+            "heat_pump_mode": {
+                "name": "热泵模式",
+                "state": {
+                    "heat": "加热",
+                    "cool": "制冷",
+                    "auto": "自动",
+                    "off": "关闭",
+                    "hotwater": "热水",
+                    "hotwater_cool": "热水制冷",
+                    "hotwater_heat": "热水加热",
+                    "hotwater_auto": "热水自动"
+                }
+            },
             "initial_state": {
                 "name": "初始状态",
                 "state": {
@@ -795,21 +808,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "热水器",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "加热",
-                            "cool": "制冷",
-                            "auto": "自动",
-                            "off": "关闭",
-                            "hotwater": "热水",
-                            "hotwater_cool": "热水制冷",
-                            "hotwater_heat": "热水加热",
-                            "hotwater_auto": "热水自动"
-                        }
-                    }
-                }
+                "name": "热水器"
             },
             "kettle": {
                 "name": "电热水壶"

+ 14 - 15
custom_components/tuya_local/translations/zh-Hant.json

@@ -421,6 +421,19 @@
                     "gbp": "英鎊"
                 }
             },
+            "heat_pump_mode": {
+                "name": "熱泵模式",
+                "state": {
+                    "heat": "加熱",
+                    "cool": "冷卻",
+                    "auto": "自動",
+                    "off": "關",
+                    "hotwater": "熱水",
+                    "hotwater_cool": "熱水冷卻",
+                    "hotwater_heat": "熱水加熱",
+                    "hotwater_auto": "熱水自動"
+                }
+            },
             "initial_state": {
                 "name": "初始狀態",
                 "state": {
@@ -796,21 +809,7 @@
         },
         "water_heater": {
             "water_air": {
-                "name": "熱水器",
-                "state_attributes": {
-                    "operation_mode": {
-                        "state": {
-                            "heat": "加熱",
-                            "cool": "冷卻",
-                            "auto": "自動",
-                            "off": "關",
-                            "hotwater": "熱水",
-                            "hotwater_cool": "熱水冷卻",
-                            "hotwater_heat": "熱水加熱",
-                            "hotwater_auto": "熱水自動"
-                        }
-                    }
-                }
+                "name": "熱水器"
             },
             "kettle": {
                 "name": "水壺"