Explorar el Código

translations (humidifier): rework to use a single translation key

Since translations based on the device class seem to not be extendable
by custom components, use a common "extended" translation_key to
extend the modes for both humidifiers and dehumidifiers.

PR #4378
Jason Rumney hace 3 semanas
padre
commit
b8fd7a2230
Se han modificado 81 ficheros con 109 adiciones y 412 borrados
  1. 0 5
      custom_components/tuya_local/devices/airx_h8_humidifier.yaml
  2. 2 1
      custom_components/tuya_local/devices/aktobis_wdh870fw_dehumidifier.yaml
  3. 2 1
      custom_components/tuya_local/devices/alecoair_d12_dehumidifier.yaml
  4. 1 0
      custom_components/tuya_local/devices/alecoair_d16_dehumidifier.yaml
  5. 1 9
      custom_components/tuya_local/devices/breville_lad208_dehumidifier.yaml
  6. 4 3
      custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml
  7. 4 3
      custom_components/tuya_local/devices/cleanair_605b_humidifier.yaml
  8. 1 0
      custom_components/tuya_local/devices/cleanair_ca702_dehumidifier.yaml
  9. 1 0
      custom_components/tuya_local/devices/climative_dh20s_dehumidifier.yaml
  10. 1 0
      custom_components/tuya_local/devices/dry_pury_evo_dehumidifier.yaml
  11. 1 0
      custom_components/tuya_local/devices/duracomfort_dh50pwm_dehumidifier.yaml
  12. 0 6
      custom_components/tuya_local/devices/eanons_humidifier.yaml
  13. 1 9
      custom_components/tuya_local/devices/ebac_dj4000_dehumidifier.yaml
  14. 1 0
      custom_components/tuya_local/devices/eberg_humi_h03g1_humidifier.yaml
  15. 2 1
      custom_components/tuya_local/devices/eberg_rico_r12e2_dehumidifier.yaml
  16. 1 0
      custom_components/tuya_local/devices/eeese_anna_dehumidifier.yaml
  17. 1 0
      custom_components/tuya_local/devices/eeese_carl_dehumidifier.yaml
  18. 1 0
      custom_components/tuya_local/devices/eeese_otto_dehumidifier.yaml
  19. 1 0
      custom_components/tuya_local/devices/eesee_adam_dehumidifier.yaml
  20. 1 0
      custom_components/tuya_local/devices/electriq_cd12pro_dehumidifier.yaml
  21. 1 9
      custom_components/tuya_local/devices/electriq_cd12pw_dehumidifier.yaml
  22. 1 0
      custom_components/tuya_local/devices/electriq_cd12pwv2_dehumidifier.yaml
  23. 1 0
      custom_components/tuya_local/devices/electriq_cd20pro_dehumidifier.yaml
  24. 1 0
      custom_components/tuya_local/devices/electriq_cd20prolev4_dehumidifier.yaml
  25. 1 11
      custom_components/tuya_local/devices/electriq_cd25pro_dehumidifier.yaml
  26. 1 0
      custom_components/tuya_local/devices/electriq_pd45e_dehumidifier.yaml
  27. 1 0
      custom_components/tuya_local/devices/emerio_dh129238_dehumidifier.yaml
  28. 1 0
      custom_components/tuya_local/devices/goldair_dehumidifier.yaml
  29. 1 0
      custom_components/tuya_local/devices/greenmigo_alpha_q25_pro_wifi.yaml
  30. 1 0
      custom_components/tuya_local/devices/htw_htwd020a4_dehumidifier.yaml
  31. 0 9
      custom_components/tuya_local/devices/hyundai_sahara_dehumidifier.yaml
  32. 2 10
      custom_components/tuya_local/devices/inventor_atmospherexl_dehumidifier.yaml
  33. 2 1
      custom_components/tuya_local/devices/inventor_evaionpro_dehumidifier.yaml
  34. 1 23
      custom_components/tuya_local/devices/jjpro_jpd01_dehumidifier.yaml
  35. 2 14
      custom_components/tuya_local/devices/jjpro_jpd02_dehumidifier.yaml
  36. 1 9
      custom_components/tuya_local/devices/kogan_dehumidifier.yaml
  37. 1 0
      custom_components/tuya_local/devices/meaco_aretetwo_dehumidifier.yaml
  38. 1 0
      custom_components/tuya_local/devices/meaco_dd8l_pro_dehumidifier.yaml
  39. 1 0
      custom_components/tuya_local/devices/morris_mdb_12160hiw_dehumidifier.yaml
  40. 2 1
      custom_components/tuya_local/devices/nwt_wdh06em_dehumidifier.yaml
  41. 2 1
      custom_components/tuya_local/devices/probreeze_pbd23w_dehumidifier.yaml
  42. 2 1
      custom_components/tuya_local/devices/qlima_d720_dehumidifier.yaml
  43. 1 0
      custom_components/tuya_local/devices/qlima_d820a_dehumidifier.yaml
  44. 1 0
      custom_components/tuya_local/devices/rohnson_r9530_dehumidifier.yaml
  45. 2 1
      custom_components/tuya_local/devices/siguro_sgrhdf300w_dehumidifier.yaml
  46. 1 0
      custom_components/tuya_local/devices/stadlerform_eva_humidifier.yaml
  47. 1 0
      custom_components/tuya_local/devices/stadlerform_karl_humidifier.yaml
  48. 1 0
      custom_components/tuya_local/devices/stadlerform_lukas_dehumidifier.yaml
  49. 1 0
      custom_components/tuya_local/devices/stadlerform_noah_humidifier.yaml
  50. 2 1
      custom_components/tuya_local/devices/sygonix_smarter_dehumidifier.yaml
  51. 5 4
      custom_components/tuya_local/devices/vacplus_dehumidifier.yaml
  52. 2 1
      custom_components/tuya_local/devices/vivosun_de0003_dehumidifier.yaml
  53. 1 0
      custom_components/tuya_local/devices/wellio_d008a20l_dehumidifier.yaml
  54. 0 5
      custom_components/tuya_local/devices/wetair_wawh1210lw_humidifier.yaml
  55. 0 5
      custom_components/tuya_local/devices/wilfa_haze_hu400bc_humidifier.yaml
  56. 2 2
      custom_components/tuya_local/devices/woods_mrd25gw_dehumidifier.yaml
  57. 12 0
      custom_components/tuya_local/icons.json
  58. 1 11
      custom_components/tuya_local/translations/bg.json
  59. 1 11
      custom_components/tuya_local/translations/ca.json
  60. 1 11
      custom_components/tuya_local/translations/cz.json
  61. 1 11
      custom_components/tuya_local/translations/de.json
  62. 1 11
      custom_components/tuya_local/translations/el.json
  63. 1 11
      custom_components/tuya_local/translations/en.json
  64. 1 11
      custom_components/tuya_local/translations/es.json
  65. 1 11
      custom_components/tuya_local/translations/fr.json
  66. 1 11
      custom_components/tuya_local/translations/hu.json
  67. 1 11
      custom_components/tuya_local/translations/id.json
  68. 1 11
      custom_components/tuya_local/translations/it.json
  69. 1 11
      custom_components/tuya_local/translations/ja.json
  70. 1 11
      custom_components/tuya_local/translations/no-NB.json
  71. 1 11
      custom_components/tuya_local/translations/pl.json
  72. 1 11
      custom_components/tuya_local/translations/pt-BR.json
  73. 1 11
      custom_components/tuya_local/translations/pt-PT.json
  74. 1 11
      custom_components/tuya_local/translations/ro.json
  75. 1 11
      custom_components/tuya_local/translations/ru.json
  76. 1 11
      custom_components/tuya_local/translations/sv.json
  77. 1 11
      custom_components/tuya_local/translations/uk.json
  78. 1 11
      custom_components/tuya_local/translations/ur.json
  79. 1 11
      custom_components/tuya_local/translations/zh-Hans.json
  80. 1 11
      custom_components/tuya_local/translations/zh-Hant.json
  81. 0 13
      tests/devices/test_eanons_humidifier.py

+ 0 - 5
custom_components/tuya_local/devices/airx_h8_humidifier.yaml

@@ -10,11 +10,6 @@ entities:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
       - id: 13
         name: humidity
         type: integer

+ 2 - 1
custom_components/tuya_local/devices/aktobis_wdh870fw_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean
@@ -25,7 +26,7 @@ entities:
           - dps_val: dry
             value: laundry
           - dps_val: continuous
-            value: boost
+            value: continuous
           - dps_val: dehumidify
             value: normal
       - id: 6

+ 2 - 1
custom_components/tuya_local/devices/alecoair_d12_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -23,7 +24,7 @@ entities:
         type: string
         mapping:
           - dps_val: Continuous
-            value: boost
+            value: continuous
           - dps_val: Sunny_Day
             value: eco
           - dps_val: Rain_Day

+ 1 - 0
custom_components/tuya_local/devices/alecoair_d16_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 9
custom_components/tuya_local/devices/breville_lad208_dehumidifier.yaml

@@ -7,17 +7,11 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 2
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 4
       - id: 2
         name: mode
         type: string
@@ -28,8 +22,6 @@ entities:
             value: "boost"
           - dps_val: 2
             value: "laundry"
-            icon: "mdi:t-shirt-crew"
-            icon_priority: 3
           - dps_val: 3
             value: "purify"
       - id: 4

+ 4 - 3
custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml

@@ -5,6 +5,7 @@ products:
     model: CA-604B Smart
 entities:
   - entity: humidifier
+    class: humidifier
     dps:
       - id: 1
         name: switch
@@ -25,11 +26,11 @@ entities:
           - dps_val: auto
             value: auto
           - dps_val: level1
-            value: low
+            value: eco
           - dps_val: level2
-            value: middle
+            value: comfort
           - dps_val: level3
-            value: high
+            value: boost
           - dps_val: sleep
             value: sleep
   - entity: switch

+ 4 - 3
custom_components/tuya_local/devices/cleanair_605b_humidifier.yaml

@@ -5,6 +5,7 @@ products:
     model: CA-605B Smart
 entities:
   - entity: humidifier
+    class: humidifier
     dps:
       - id: 1
         name: switch
@@ -27,11 +28,11 @@ entities:
           - dps_val: auto
             value: auto
           - dps_val: level1
-            value: "1"
+            value: eco
           - dps_val: level2
-            value: "2"
+            value: comfort
           - dps_val: level3
-            value: "3"
+            value: boost
   - entity: sensor
     name: Current temperature
     class: temperature

+ 1 - 0
custom_components/tuya_local/devices/cleanair_ca702_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 1 - 0
custom_components/tuya_local/devices/climative_dh20s_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 1 - 0
custom_components/tuya_local/devices/dry_pury_evo_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/duracomfort_dh50pwm_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 0 - 6
custom_components/tuya_local/devices/eanons_humidifier.yaml

@@ -4,12 +4,6 @@ entities:
   - entity: humidifier
     class: humidifier
     dps:
-      - id: 3
-        name: timer_hr
-        type: string
-      - id: 4
-        name: timer_min
-        type: integer
       - id: 10
         name: switch
         type: boolean

+ 1 - 9
custom_components/tuya_local/devices/ebac_dj4000_dehumidifier.yaml

@@ -6,17 +6,11 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:ait-humidifier-off"
-            icon_priority: 1
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 3
       - id: 2
         name: humidity
         type: integer
@@ -33,8 +27,6 @@ entities:
             value: comfort
           - dps_val: drying
             value: laundry
-            icon: "mdi:tshirt-crew-outline"
-            icon_priority: 2
           - dps_val: manual
             value: normal
           - dps_val: boost

+ 1 - 0
custom_components/tuya_local/devices/eberg_humi_h03g1_humidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: humidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 2 - 1
custom_components/tuya_local/devices/eberg_rico_r12e2_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -24,7 +25,7 @@ entities:
         type: string
         mapping:
           - dps_val: Continuities
-            value: boost
+            value: continuous
           - dps_val: Auto
             value: auto
           - dps_val: Sleep

+ 1 - 0
custom_components/tuya_local/devices/eeese_anna_dehumidifier.yaml

@@ -2,6 +2,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/eeese_carl_dehumidifier.yaml

@@ -2,6 +2,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/eeese_otto_dehumidifier.yaml

@@ -9,6 +9,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/eesee_adam_dehumidifier.yaml

@@ -3,6 +3,7 @@ legacy_type: eeese_emil_dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/electriq_cd12pro_dehumidifier.yaml

@@ -3,6 +3,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 9
custom_components/tuya_local/devices/electriq_cd12pw_dehumidifier.yaml

@@ -3,17 +3,11 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 1
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 3
       - id: 2
         name: mode
         type: string
@@ -22,8 +16,6 @@ entities:
             value: auto
           - dps_val: "fan"
             value: purify
-            icon: "mdi:air-purifier"
-            icon_priority: 2
       - id: 3
         type: integer
         name: current_humidity

+ 1 - 0
custom_components/tuya_local/devices/electriq_cd12pwv2_dehumidifier.yaml

@@ -3,6 +3,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/electriq_cd20pro_dehumidifier.yaml

@@ -16,6 +16,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/electriq_cd20prolev4_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 1 - 11
custom_components/tuya_local/devices/electriq_cd25pro_dehumidifier.yaml

@@ -4,17 +4,11 @@ legacy_type: electriq_dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 1
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 3
       - id: 2
         name: mode
         type: string
@@ -25,12 +19,8 @@ entities:
             value: eco
           - dps_val: high
             value: boost
-            icon: "mdi:tshirt-crew-outline"
-            icon_priority: 2
           - dps_val: fan
             value: purify
-            icon: "mdi:air-purifier"
-            icon_priority: 2
       - id: 3
         type: integer
         name: current_humidity

+ 1 - 0
custom_components/tuya_local/devices/electriq_pd45e_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/emerio_dh129238_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/goldair_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/greenmigo_alpha_q25_pro_wifi.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/htw_htwd020a4_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 0 - 9
custom_components/tuya_local/devices/hyundai_sahara_dehumidifier.yaml

@@ -11,13 +11,6 @@ entities:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 1
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 4
       - id: 2
         name: humidity
         type: integer
@@ -37,8 +30,6 @@ entities:
             value: normal
           - dps_val: true
             value: sleep
-            icon: "mdi:power-sleep"
-            icon_priority: 3
   - entity: fan
     dps:
       - id: 1

+ 2 - 10
custom_components/tuya_local/devices/inventor_atmospherexl_dehumidifier.yaml

@@ -6,21 +6,13 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 110
         type: string
         name: switch
-        mapping:
-          - dps_val: "air_purifier"
-            value: false
-          - dps_val: "dehumi_air"
-            value: true
-            constraint: main_switch
-            conditions:
-              - dps_val: false
-                invalid: true
       - id: 1
-        name: main_switch
+        name: available
         type: boolean
       - id: 3
         type: string

+ 2 - 1
custom_components/tuya_local/devices/inventor_evaionpro_dehumidifier.yaml

@@ -3,6 +3,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean
@@ -22,7 +23,7 @@ entities:
           - dps_val: manual
             value: normal
           - dps_val: continuous
-            value: boost
+            value: continuous
           - dps_val: smart
             value: auto
           - dps_val: drying

+ 1 - 23
custom_components/tuya_local/devices/jjpro_jpd01_dehumidifier.yaml

@@ -6,37 +6,23 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 3
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 5
       - id: 2
         name: mode
         type: string
         mapping:
           - dps_val: "0"
             value: normal
-            icon: "mdi:water-outline"
-            icon_priority: 4
           - dps_val: "1"
             value: boost
-            icon: "mdi:water-plus-outline"
-            icon_priority: 4
           - dps_val: "2"
             value: laundry
-            icon: "mdi:tshirt-crew-outline"
-            icon_priority: 4
           - dps_val: "3"
             value: purify
-            icon: "mdi:tailwind"
-            icon_priority: 4
       - id: 4
         type: integer
         name: humidity
@@ -51,14 +37,6 @@ entities:
       - id: 104
         type: integer
         name: current_humidity
-      - id: 105
-        type: boolean
-        name: defrosting
-        hidden: true
-        mapping:
-          - dps_val: true
-            icon: "mdi:snowflake-melt"
-            icon_priority: 2
   - entity: fan
     dps:
       - id: 1

+ 2 - 14
custom_components/tuya_local/devices/jjpro_jpd02_dehumidifier.yaml

@@ -6,17 +6,11 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 3
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 5
       - id: 2
         type: integer
         name: humidity
@@ -30,17 +24,11 @@ entities:
         type: string
         mapping:
           - dps_val: Continuities
-            value: boost
-            icon: "mdi:tshirt-crew-outline"
-            icon_priority: 4
+            value: continuous
           - dps_val: Auto
             value: auto
-            icon: "mdi:water-outline"
-            icon_priority: 4
           - dps_val: Sleep
             value: sleep
-            icon: "mdi:weather-night"
-            icon_priority: 4
       - id: 6
         type: integer
         name: current_humidity

+ 1 - 9
custom_components/tuya_local/devices/kogan_dehumidifier.yaml

@@ -6,17 +6,11 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
-            icon_priority: 2
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-            icon_priority: 4
       - id: 2
         name: mode
         type: string
@@ -29,8 +23,6 @@ entities:
             value: boost
           - dps_val: quickdry
             value: laundry
-            icon: "mdi:tshirt-crew-outline"
-            icon_priority: 3
       - id: 3
         name: current_humidity
         type: integer

+ 1 - 0
custom_components/tuya_local/devices/meaco_aretetwo_dehumidifier.yaml

@@ -12,6 +12,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/meaco_dd8l_pro_dehumidifier.yaml

@@ -7,6 +7,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/morris_mdb_12160hiw_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 2 - 1
custom_components/tuya_local/devices/nwt_wdh06em_dehumidifier.yaml

@@ -6,6 +6,7 @@ name: Dehumidifier
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean
@@ -25,7 +26,7 @@ entities:
           - dps_val: dehumidify
             value: auto
           - dps_val: continuous
-            value: boost
+            value: continuous
           - dps_val: dry
             value: laundry
       - id: 6

+ 2 - 1
custom_components/tuya_local/devices/probreeze_pbd23w_dehumidifier.yaml

@@ -10,6 +10,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean
@@ -21,7 +22,7 @@ entities:
           - dps_val: "0"
             value: auto
           - dps_val: "1"
-            value: Continuous
+            value: continuous
           - dps_val: "2"
             value: boost
           - dps_val: "3"

+ 2 - 1
custom_components/tuya_local/devices/qlima_d720_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean
@@ -29,7 +30,7 @@ entities:
           - dps_val: "smart"
             value: "auto"
           - dps_val: "drying"
-            value: "dry"
+            value: "laundry"
       - id: 6
         type: integer
         name: current_humidity

+ 1 - 0
custom_components/tuya_local/devices/qlima_d820a_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 1 - 0
custom_components/tuya_local/devices/rohnson_r9530_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 2 - 1
custom_components/tuya_local/devices/siguro_sgrhdf300w_dehumidifier.yaml

@@ -14,6 +14,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -31,7 +32,7 @@ entities:
         type: string
         mapping:
           - dps_val: Continuities
-            value: boost
+            value: continuous
           - dps_val: Auto
             value: auto
           - dps_val: Sleep

+ 1 - 0
custom_components/tuya_local/devices/stadlerform_eva_humidifier.yaml

@@ -5,6 +5,7 @@ products:
     model: Eva
 entities:
   - entity: humidifier
+    class: humidifier
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/stadlerform_karl_humidifier.yaml

@@ -8,6 +8,7 @@ products:
     model: Karl big
 entities:
   - entity: humidifier
+    class: humidifier
     dps:
       - id: 1
         name: switch

+ 1 - 0
custom_components/tuya_local/devices/stadlerform_lukas_dehumidifier.yaml

@@ -8,6 +8,7 @@ entities:
   # Main control
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         type: boolean

+ 1 - 0
custom_components/tuya_local/devices/stadlerform_noah_humidifier.yaml

@@ -8,6 +8,7 @@ products:
     model: Noah Pro
 entities:
   - entity: humidifier
+    class: humidifier
     dps:
       - id: 1
         name: switch

+ 2 - 1
custom_components/tuya_local/devices/sygonix_smarter_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -23,7 +24,7 @@ entities:
         type: string
         mapping:
           - dps_val: Continuities
-            value: boost
+            value: continuous
           - dps_val: Auto
             value: auto
           - dps_val: Sleep

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

@@ -5,6 +5,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -25,13 +26,13 @@ entities:
         type: string
         mapping:
           - dps_val: dehumidify
-            value: Dehumidify
+            value: normal
           - dps_val: rainy
-            value: Rainy
+            value: boost
           - dps_val: dry
-            value: Dry
+            value: laundry
           - dps_val: sleep
-            value: Sleep
+            value: sleep
   - entity: switch
     translation_key: ionizer
     dps:

+ 2 - 1
custom_components/tuya_local/devices/vivosun_de0003_dehumidifier.yaml

@@ -6,6 +6,7 @@ products:
 entities:
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       - id: 1
         name: switch
@@ -23,7 +24,7 @@ entities:
         type: string
         mapping:
           - dps_val: Continuities
-            value: boost
+            value: continuous
           - dps_val: Auto
             value: auto
           - dps_val: Sleep

+ 1 - 0
custom_components/tuya_local/devices/wellio_d008a20l_dehumidifier.yaml

@@ -9,6 +9,7 @@ entities:
   # Main dehumidifier entity exposed to Home Assistant
   - entity: humidifier
     class: dehumidifier
+    translation_only_key: extended
     dps:
       # Power on/off
       - id: 1

+ 0 - 5
custom_components/tuya_local/devices/wetair_wawh1210lw_humidifier.yaml

@@ -7,11 +7,6 @@ entities:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
       - id: 13
         name: humidity
         type: integer

+ 0 - 5
custom_components/tuya_local/devices/wilfa_haze_hu400bc_humidifier.yaml

@@ -10,11 +10,6 @@ entities:
       - id: 1
         name: switch
         type: boolean
-        mapping:
-          - dps_val: true
-            icon: "mdi:air-humidifier"
-          - dps_val: false
-            icon: "mdi:air-humidifier-off"
       - id: 13
         name: humidity
         type: integer

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

@@ -31,9 +31,9 @@ entities:
         type: string
         mapping:
           - dps_val: low
-            value: Low
+            value: eco
           - dps_val: high
-            value: High
+            value: boost
       # Current humidity measurement
       - id: 6
         name: sensor

+ 12 - 0
custom_components/tuya_local/icons.json

@@ -108,6 +108,18 @@
                 }
             }
         },
+        "humidifier": {
+            "extended": {
+                "state_attributes": {
+                    "mode": {
+                        "state": {
+                            "laundry": "mdi:tshirt-crew",
+                            "purify": "mdi:air-filter"
+                        }
+                    }
+                }
+            }
+        },
         "light": {
             "backlight": {
                 "default": "mdi:television-ambient-light"

+ 1 - 11
custom_components/tuya_local/translations/bg.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Пречистете",
-                            "continuous": "Непрекъснато"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/ca.json

@@ -510,7 +510,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -520,16 +520,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purifica",
-                            "continuous": "Continu"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/cz.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Očistit",
-                            "continuous": "Nepřetržitý"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/de.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Reinigen",
-                            "continuous": "Dauerbetrieb"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/el.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Καθαρισμός",
-                            "continuous": "Συνεχής"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/en.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purify",
-                            "continuous": "Continuous"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/es.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purificar",
-                            "continuous": "Continuo"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/fr.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purifier",
-                            "continuous": "Continu"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/hu.json

@@ -328,7 +328,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -338,16 +338,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Tisztítás",
-                            "continuous": "Folyamatos"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/id.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Penjernih",
-                            "continuous": "Terus menerus"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/it.json

@@ -328,7 +328,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -338,16 +338,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purifica",
-                            "continuous": "Continuo"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/ja.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "浄化",
-                            "continuous": "連続"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/no-NB.json

@@ -328,7 +328,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -338,16 +338,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Rens",
-                            "continuous": "Kontinuerlig"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/pl.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Oczyszczanie",
-                            "continuous": "Ciągły"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/pt-BR.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purificar",
-                            "continuous": "Contínuo"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/pt-PT.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purificar",
-                            "continuous": "Contínuo"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/ro.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Purificare",
-                            "continuous": "Continuu"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/ru.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Очистка",
-                            "continuous": "Непрерывный"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/sv.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Rena",
-                            "continuous": "Kontinuerlig"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/uk.json

@@ -328,7 +328,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -338,16 +338,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "Очистити",
-                            "continuous": "Постійний"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/ur.json

@@ -330,7 +330,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -340,16 +340,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "پاک کریں۔",
-                            "continuous": "مسلسل"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/zh-Hans.json

@@ -327,7 +327,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -337,16 +337,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "净化",
-                            "continuous": "连续"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 1 - 11
custom_components/tuya_local/translations/zh-Hant.json

@@ -328,7 +328,7 @@
             }
         },
         "humidifier": {
-            "dehumidifier": {
+            "extended": {
                 "state_attributes": {
                     "mode": {
                         "state": {
@@ -338,16 +338,6 @@
                         }
                     }
                 }
-            },
-            "humidifier": {
-                "state_attributes": {
-                    "mode": {
-                        "state": {
-                            "purify": "淨化",
-                            "continuous": "連續"
-                        }
-                    }
-                }
             }
         },
         "fan": {

+ 0 - 13
tests/devices/test_eanons_humidifier.py

@@ -174,19 +174,6 @@ class TestEanonsHumidifier(
             await self.subject.async_set_mode(MODE_NORMAL)
             self.subject._device.anticipate_property_value.assert_not_called()
 
-    def test_extra_state_attributes(self):
-        self.dps[TIMERHR_DPS] = "cancel"
-        self.dps[TIMER_DPS] = 0
-        self.dps[FANMODE_DPS] = "middle"
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "timer_hr": "cancel",
-                "timer_min": 0,
-            },
-        )
-
     def test_fan_speed(self):
         self.dps[FANMODE_DPS] = "small"
         self.assertEqual(self.fan.percentage, 33)