Răsfoiți Sursa

feat!(translations): standardise air purifier fan translations

- some were named purifier, others used fan_with_presets translation
key, others without any. Standardize the translation key with icons
and preset mode translations. Some renaming of presets to fit into
the minimal set chosen:
  - auto
  - manual
  - sleep
  - low
  - medium
  - high
  - strong
  - displayoff

Issue #1708
Jason Rumney 2 zile în urmă
părinte
comite
29ee9dabc0
70 a modificat fișierele cu 613 adăugiri și 123 ștergeri
  1. 28 0
      custom_components/tuya_local/__init__.py
  2. 1 1
      custom_components/tuya_local/config_flow.py
  3. 1 1
      custom_components/tuya_local/devices/alen_35i_airpurifier.yaml
  4. 3 3
      custom_components/tuya_local/devices/alen_45i_airpurifier.yaml
  5. 3 3
      custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml
  6. 1 1
      custom_components/tuya_local/devices/breville_easyair_purifier.yaml
  7. 3 4
      custom_components/tuya_local/devices/breville_smartairconnect_purifier.yaml
  8. 3 4
      custom_components/tuya_local/devices/cecotec_totalpure_purifier.yaml
  9. 1 1
      custom_components/tuya_local/devices/cleverio_ap100_purifier.yaml
  10. 1 0
      custom_components/tuya_local/devices/comfortzone_ap100_airpurifier.yaml
  11. 1 2
      custom_components/tuya_local/devices/duux_bright_purifier.yaml
  12. 3 4
      custom_components/tuya_local/devices/essentials_purifier.yaml
  13. 5 5
      custom_components/tuya_local/devices/himox_h05_purifier.yaml
  14. 12 0
      custom_components/tuya_local/devices/himox_h06_purifier.yaml
  15. 3 3
      custom_components/tuya_local/devices/hosome_purifier.yaml
  16. 3 4
      custom_components/tuya_local/devices/ihunt_400_airpurifier.yaml
  17. 1 1
      custom_components/tuya_local/devices/ihunt_50_airpurifier.yaml
  18. 1 2
      custom_components/tuya_local/devices/jafanda_jf260s_airpurifier.yaml
  19. 1 1
      custom_components/tuya_local/devices/jafanda_jf500_airpurifier.yaml
  20. 1 1
      custom_components/tuya_local/devices/kilo_plus_air_purifier.yaml
  21. 3 4
      custom_components/tuya_local/devices/klarta_forste4_purifier.yaml
  22. 3 4
      custom_components/tuya_local/devices/klarta_stor2_purifier.yaml
  23. 2 2
      custom_components/tuya_local/devices/kogan_5pro_airpurifier.yaml
  24. 4 4
      custom_components/tuya_local/devices/kogan_air_purifier.yaml
  25. 3 3
      custom_components/tuya_local/devices/lifubide_x600_purifier.yaml
  26. 1 2
      custom_components/tuya_local/devices/meaco_clean_purifier.yaml
  27. 1 1
      custom_components/tuya_local/devices/morento_mr5866_air_purifier.yaml
  28. 7 7
      custom_components/tuya_local/devices/nac_ap470_purifier.yaml
  29. 3 4
      custom_components/tuya_local/devices/nx_100ap_air_purifier.yaml
  30. 3 4
      custom_components/tuya_local/devices/poiema_one_purifier.yaml
  31. 4 5
      custom_components/tuya_local/devices/proscenic_a8_airpurifier.yaml
  32. 2 3
      custom_components/tuya_local/devices/proscenic_a9_airpurifier.yaml
  33. 1 1
      custom_components/tuya_local/devices/siguro_apk50_purifier.yaml
  34. 3 7
      custom_components/tuya_local/devices/smartmi_air_purifier_p1.yaml
  35. 3 4
      custom_components/tuya_local/devices/smartmi_e1_purifier.yaml
  36. 3 3
      custom_components/tuya_local/devices/soho_air_purifier.yaml
  37. 3 4
      custom_components/tuya_local/devices/soleusair_air_purifier.yaml
  38. 10 0
      custom_components/tuya_local/devices/stadlerform_roger_purifier.yaml
  39. 4 4
      custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml
  40. 3 3
      custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml
  41. 1 0
      custom_components/tuya_local/devices/tesla_s300_purifier.yaml
  42. 1 0
      custom_components/tuya_local/devices/touchstone_sideline_fireplace.yaml
  43. 1 1
      custom_components/tuya_local/devices/trident_airdome70_airpurifier.yaml
  44. 3 3
      custom_components/tuya_local/devices/vephos_true_airpurifier.yaml
  45. 3 3
      custom_components/tuya_local/devices/vestfrost_vp_a1z40hw_purifier.yaml
  46. 5 6
      custom_components/tuya_local/devices/vork_vk6067aw_purifier.yaml
  47. 66 0
      custom_components/tuya_local/icons.json
  48. 17 0
      custom_components/tuya_local/translations/bg.json
  49. 17 0
      custom_components/tuya_local/translations/ca.json
  50. 17 0
      custom_components/tuya_local/translations/cz.json
  51. 17 0
      custom_components/tuya_local/translations/de.json
  52. 17 0
      custom_components/tuya_local/translations/el.json
  53. 17 0
      custom_components/tuya_local/translations/en.json
  54. 17 0
      custom_components/tuya_local/translations/es.json
  55. 17 0
      custom_components/tuya_local/translations/fr.json
  56. 17 0
      custom_components/tuya_local/translations/hu.json
  57. 17 0
      custom_components/tuya_local/translations/id.json
  58. 17 0
      custom_components/tuya_local/translations/it.json
  59. 17 0
      custom_components/tuya_local/translations/ja.json
  60. 17 0
      custom_components/tuya_local/translations/no-NB.json
  61. 17 0
      custom_components/tuya_local/translations/pl.json
  62. 17 0
      custom_components/tuya_local/translations/pt-BR.json
  63. 17 0
      custom_components/tuya_local/translations/pt-PT.json
  64. 17 0
      custom_components/tuya_local/translations/ro.json
  65. 17 0
      custom_components/tuya_local/translations/ru.json
  66. 17 0
      custom_components/tuya_local/translations/sv.json
  67. 17 0
      custom_components/tuya_local/translations/uk.json
  68. 17 0
      custom_components/tuya_local/translations/ur.json
  69. 17 0
      custom_components/tuya_local/translations/zh-Hans.json
  70. 17 0
      custom_components/tuya_local/translations/zh-Hant.json

+ 28 - 0
custom_components/tuya_local/__init__.py

@@ -895,6 +895,34 @@ async def async_migrate_entry(hass, entry: ConfigEntry):
         await async_migrate_entries(hass, entry.entry_id, update_unique_id13_18)
         hass.config_entries.async_update_entry(entry, minor_version=18)
 
+    if entry.version == 13 and entry.minor_version < 19:
+        # Migrate unique ids of existing entities to new id taking into
+        # account translation_key, and standardising naming
+        device_id = get_device_unique_id(entry)
+        conf_file = await hass.async_add_executor_job(
+            get_config,
+            entry.data[CONF_TYPE],
+        )
+        if conf_file is None:
+            _LOGGER.error(
+                NOT_FOUND,
+                entry.data[CONF_TYPE],
+            )
+            return False
+
+        @callback
+        def update_unique_id13_19(entity_entry):
+            """Update the unique id of an entity entry."""
+            # Standardistion of entity naming to use translation_key
+            replacements = {
+                "fan_purifier": "fan_air_purifier",
+                "fan_fan_with_presets": "fan_air_purifier",
+                "fan": "fan_air_purifier",
+            }
+            return replace_unique_ids(entity_entry, device_id, conf_file, replacements)
+
+        await async_migrate_entries(hass, entry.entry_id, update_unique_id13_19)
+        hass.config_entries.async_update_entry(entry, minor_version=19)
     return True
 
 

+ 1 - 1
custom_components/tuya_local/config_flow.py

@@ -53,7 +53,7 @@ DEVICE_DETAILS_URL = (
 
 class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
     VERSION = 13
-    MINOR_VERSION = 18
+    MINOR_VERSION = 19
     CONNECTION_CLASS = CONN_CLASS_LOCAL_PUSH
     device = None
     data = {}

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

@@ -5,7 +5,7 @@ products:
     model: BreatheSmart 35i
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

+ 3 - 3
custom_components/tuya_local/devices/alen_45i_airpurifier.yaml

@@ -8,7 +8,7 @@ products:
     model: BreatheSmart 45i V1.5
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -30,9 +30,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: Manual
-            value: custom
+            value: manual
           - dps_val: Auto
-            value: smart
+            value: auto
           - dps_val: Sleep
             value: sleep
   - entity: sensor

+ 3 - 3
custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml

@@ -5,7 +5,7 @@ products:
     model: APR005HA
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -15,9 +15,9 @@ entities:
         type: string
         mapping:
           - dps_val: Auto
-            value: smart
+            value: auto
           - dps_val: Manual
-            value: normal
+            value: manual
           - dps_val: Sleep
             value: sleep
       - id: 4

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

@@ -5,7 +5,7 @@ products:
     model: Easy Air
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch

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

@@ -5,8 +5,7 @@ products:
     model: Smart Air Connect
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -16,9 +15,9 @@ entities:
         type: string
         mapping:
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: auto
-            value: smart
+            value: auto
       - id: 4
         type: string
         name: speed

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

@@ -8,8 +8,7 @@ entities:
   # Fan (On/Off + Preset modes + Speed)
   # -------------------------------------------------------
   - entity: fan
-    translation_key: fan_with_presets
-    icon: mdi:air-purifier
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -32,11 +31,11 @@ entities:
         mapping:
           # Map HA preset values to defined presets (keep device DP values)
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: manual
-            value: normal
+            value: manual
 
   # -------------------------------------------------------
   # Sensors

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

@@ -5,7 +5,7 @@ products:
     model: AP100
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -5,6 +5,7 @@ products:
     model: AP100
 entities:
   - entity: fan
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -5,8 +5,7 @@ products:
     model: Bright
 entities:
   - entity: fan
-    translation_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -1,8 +1,7 @@
 name: Air purifier
 entities:
   - entity: fan
-    translation_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -12,9 +11,9 @@ entities:
         type: string
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: M
-            value: normal
+            value: manual
           - dps_val: H
             value: strong
           - dps_val: sleep

+ 5 - 5
custom_components/tuya_local/devices/himox_h05_purifier.yaml

@@ -1,7 +1,7 @@
 name: Air purifier
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -11,13 +11,13 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: low
-            value: sleep
+            value: low
           - dps_val: mid
-            value: fresh
+            value: medium
           - dps_val: high
-            value: strong
+            value: high
   - entity: sensor
     class: temperature
     category: diagnostic

+ 12 - 0
custom_components/tuya_local/devices/himox_h06_purifier.yaml

@@ -1,6 +1,7 @@
 name: Air purifier
 entities:
   - entity: fan
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,6 +16,16 @@ entities:
             value: 67
           - dps_val: "high"
             value: 100
+      - id: 101
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: calcle
+            value: auto
+          - dps_val: "1"
+            value: medium
+          - dps_val: "2"
+            value: high
   - entity: sensor
     name: Active filter life
     icon: "mdi:air-filter"
@@ -69,6 +80,7 @@ entities:
         name: sensor
   - entity: select
     name: Configuration
+    deprecated: fan.preset_mode  # 2026-05-18
     dps:
       - id: 101
         name: option

+ 3 - 3
custom_components/tuya_local/devices/hosome_purifier.yaml

@@ -4,7 +4,7 @@ products:
     manufacturer: Hosome
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -14,9 +14,9 @@ entities:
         type: string
         mapping:
           - dps_val: Auto
-            value: smart
+            value: auto
           - dps_val: Manual
-            value: normal
+            value: manual
           - dps_val: Sleep
             value: sleep
       - id: 4

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

@@ -5,8 +5,7 @@ products:
     model: 400m³/h
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
-    translation_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -28,9 +27,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
   - entity: sensor

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

@@ -5,7 +5,7 @@ products:
     model: 50m³/h
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch

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

@@ -5,8 +5,7 @@ products:
     model: JF260S
 entities:
   - entity: fan
-    translation_key: fan_with_presets
-    name: Purifier
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -6,7 +6,7 @@ products:
 
 entities:
   - entity: fan
-    translation_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -5,7 +5,7 @@ products:
     model: Kilo Plus
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -5,8 +5,7 @@ products:
     model: Forste 4
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -16,9 +15,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: sleep
             value: sleep
           - dps_val: screenoff

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

@@ -5,8 +5,7 @@ products:
     model: Stor 2
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -16,9 +15,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: sleep
             value: sleep
           - dps_val: screenoff

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

@@ -5,7 +5,7 @@ products:
     model: AP-3029UAS
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,7 +15,7 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: manual

+ 4 - 4
custom_components/tuya_local/devices/kogan_air_purifier.yaml

@@ -6,7 +6,7 @@ products:
     model_id: KAIRPRFR2SA
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -16,11 +16,11 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: 1
-            value: "sleep"
+            value: sleep
           - dps_val: 2
-            value: "strong"
+            value: strong
           - dps_val: 3
-            value: "smart"
+            value: auto
   - entity: sensor
     translation_key: filter_life
     dps:

+ 3 - 3
custom_components/tuya_local/devices/lifubide_x600_purifier.yaml

@@ -5,7 +5,7 @@ products:
     model: X600
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,11 +15,11 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: manual
-            value: normal
+            value: manual
   - entity: sensor
     class: pm25
     dps:

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

@@ -6,8 +6,7 @@ products:
     model: Clean CA-HEPA 76x5
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch

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

@@ -7,7 +7,7 @@ products:
 
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch

+ 7 - 7
custom_components/tuya_local/devices/nac_ap470_purifier.yaml

@@ -5,7 +5,7 @@ products:
     model: AP470
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,17 +15,17 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: 1
-            value: Auto
+            value: auto
           - dps_val: 2
-            value: Sleep
+            value: sleep
           - dps_val: 3
-            value: Level 1
+            value: low
           - dps_val: 4
-            value: Level 2
+            value: medium
           - dps_val: 4
-            value: Level 3
+            value: high
           - dps_val: 6
-            value: Level 4
+            value: strong
   - entity: sensor
     class: pm25
     dps:

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

@@ -4,8 +4,7 @@ products:
     model: NX-100AP Rapid
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -17,11 +16,11 @@ entities:
           - dps_val: Sleep
             value: sleep
           - dps_val: M
-            value: normal
+            value: manual
           - dps_val: H
             value: strong
           - dps_val: Auto
-            value: smart
+            value: auto
   - entity: sensor
     translation_key: time_remaining
     class: duration

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

@@ -5,8 +5,7 @@ products:
     model: One
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -16,9 +15,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
       - id: 4

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

@@ -5,8 +5,7 @@ products:
     model: A8
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -18,11 +17,11 @@ entities:
           - dps_val: sleep
             value: sleep
           - dps_val: mid
-            value: fresh
+            value: medium
           - dps_val: high
-            value: strong
+            value: high
           - dps_val: auto
-            value: smart
+            value: auto
       - id: 101
         name: unknown_101
         type: integer

+ 2 - 3
custom_components/tuya_local/devices/proscenic_a9_airpurifier.yaml

@@ -5,8 +5,7 @@ products:
     model: A9
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -24,7 +23,7 @@ entities:
           - dps_val: "3"
             value: high
           - dps_val: "4"
-            value: turbo
+            value: strong
           - dps_val: "Auto"
             value: auto
       - id: 4

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

@@ -6,7 +6,7 @@ products:
     model_id: AP-K50
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

+ 3 - 7
custom_components/tuya_local/devices/smartmi_air_purifier_p1.yaml

@@ -14,8 +14,7 @@ entities:
   # Fan (On/Off + Preset modes + Speed)
   # -------------------------------------------------------
   - entity: fan
-    translation_key: fan_with_presets
-    icon: mdi:air-purifier
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -28,8 +27,6 @@ entities:
         range:
           min: 1
           max: 100
-        mapping:
-          - scale: 1
 
       - id: 3
         name: preset_mode
@@ -37,20 +34,19 @@ entities:
         mapping:
           # Map HA preset values to defined presets (keep device DP values)
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: strong
             value: strong
           - dps_val: manual
-            value: normal
+            value: manual
 
   # -------------------------------------------------------
   # Sensors
   # -------------------------------------------------------
   - entity: sensor
     class: pm25
-    icon: mdi:air-filter
     dps:
       - id: 2
         name: sensor

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

@@ -5,8 +5,7 @@ products:
     model: E1
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -18,9 +17,9 @@ entities:
           - dps_val: sleep
             value: sleep
           - dps_val: auto
-            value: normal
+            value: auto
           - dps_val: manual
-            value: strong
+            value: manual
   - entity: light
     translation_key: indicator
     category: config

+ 3 - 3
custom_components/tuya_local/devices/soho_air_purifier.yaml

@@ -1,7 +1,7 @@
 name: Air purifier
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -11,9 +11,9 @@ entities:
         type: string
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: sleep
             value: sleep
       - id: 4

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

@@ -8,8 +8,7 @@ products:
     model: KJ760F A02
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
-    icon: "mdi:air-purifier"
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -25,9 +24,9 @@ entities:
         type: string
         mapping:
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: displayoff

+ 10 - 0
custom_components/tuya_local/devices/stadlerform_roger_purifier.yaml

@@ -5,6 +5,7 @@ products:
     model: Roger
 entities:
   - entity: fan
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -25,6 +26,14 @@ entities:
             value: 80
           - dps_val: auto
             value: 100
+      - id: 101
+        type: boolean
+        name: preset_mode
+        mapping:
+          - dps_val: false
+            value: manual
+          - dps_val: true
+            value: auto
   - entity: lock
     translation_key: child_lock
     dps:
@@ -102,6 +111,7 @@ entities:
     name: Auto
     class: switch
     icon: "mdi:power-sleep"
+    deprecated: fan.preset_mode  # 2026-05-18
     dps:
       - id: 101
         name: switch

+ 4 - 4
custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml

@@ -5,7 +5,7 @@ products:
     model: Mini
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,13 +15,13 @@ entities:
         type: string
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: mid
-            value: fresh
+            value: medium
           - dps_val: high
-            value: strong
+            value: high
   - entity: light
     category: config
     dps:

+ 3 - 3
custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml

@@ -5,7 +5,7 @@ products:
     model: Pro M
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,11 +15,11 @@ entities:
         type: string
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
           - dps_val: manual
-            value: normal
+            value: manual
       - id: 4
         name: speed
         type: string

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

@@ -5,6 +5,7 @@ products:
     model: S300
 entities:
   - entity: fan
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean

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

@@ -187,6 +187,7 @@ entities:
           - dps_val: "1"
             value: "off"
           - value: "off"
+            hidden: true
   - entity: light
     translation_key: logs
     category: config

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

@@ -5,7 +5,7 @@ products:
     model: AirDome-70
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch

+ 3 - 3
custom_components/tuya_local/devices/vephos_true_airpurifier.yaml

@@ -5,7 +5,7 @@ products:
     model: "True"
 entities:
   - entity: fan
-    translation_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         type: boolean
@@ -15,9 +15,9 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: manual
-            value: normal
+            value: manual
           - dps_val: sleep
             value: sleep
       - id: 4

+ 3 - 3
custom_components/tuya_local/devices/vestfrost_vp_a1z40hw_purifier.yaml

@@ -5,7 +5,7 @@ products:
     model: VP-A1Z40HW
 entities:
   - entity: fan
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -15,9 +15,9 @@ entities:
         type: string
         mapping:
           - dps_val: Auto
-            value: smart
+            value: auto
           - dps_val: Manual
-            value: normal
+            value: manual
           - dps_val: Sleep
             value: sleep
       - id: 4

+ 5 - 6
custom_components/tuya_local/devices/vork_vk6067aw_purifier.yaml

@@ -5,8 +5,7 @@ products:
     model: VK-6067AW
 entities:
   - entity: fan
-    icon: "mdi:air-purifier"
-    translation_only_key: fan_with_presets
+    translation_key: air_purifier
     dps:
       - id: 1
         name: switch
@@ -16,13 +15,13 @@ entities:
         name: preset_mode
         mapping:
           - dps_val: low
-            value: nature
+            value: low
           - dps_val: mid
-            value: fresh
+            value: medium
           - dps_val: high
-            value: strong
+            value: high
           - dps_val: auto
-            value: smart
+            value: auto
           - dps_val: sleep
             value: sleep
   - entity: sensor

+ 66 - 0
custom_components/tuya_local/icons.json

@@ -239,6 +239,26 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "default": "mdi:air-purifier",
+                "state": {
+                    "off": "mdi:air-purifier-off"
+                },
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "mdi:fan-auto",
+                            "manual": "mdi:hand-back-left",
+                            "sleep": "mdi:sleep",
+                            "low": "mdi:fan-speed--1",
+                            "medium": "mdi:fan-speed-2",
+                            "high": "mdi:fan-speed-3",
+                            "strong": "mdi:weather-hurricane",
+                            "displayoff": "mdi:monitor-off"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "default": "mdi:scent",
                 "state": {
@@ -257,6 +277,20 @@
                     }
                 }
             },
+            "dehumidifier": {
+                "default": "mdi:water-percent",
+                "state": {
+                    "off": "mdi:water-off"
+                },
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "purify": "mdi:air-filter",
+                            "dehumidify": "mdi:water-percent"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -269,10 +303,42 @@
                             "smart": "mdi:auto-mode",
                             "strong": "mdi:weather-hurricane",
                             "displayoff": "mdi:monitor-off",
+                            "custom": "mdi:shape",
+                            "auto": "mdi:fan-auto",
+                            "manual": "mdi:hand-back-left",
+                            "program": "mdi:calendar-clock",
+                            "high": "mdi:fan-speed-3",
+                            "medium": "mdi:fan-speed-2",
+                            "low": "mdi:fan-speed--1",
+                            "displayoff": "mdi:monitor-off",
                             "off": "mdi:fan-off"
                         }
                     }
                 }
+            },
+            "ventilation": {
+                "default": "mdi:hvac",
+                "state": {
+                    "off": "mdi:hvac-off"
+                },
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "fresh": "mdi:air-filter",
+                            "circulate": "mdi:cached",
+                            "sleep": "mdi:sleep",
+                            "auto": "mdi:auto-mode",
+                            "manual": "mdi:hand-back-left",
+                            "eco": "mdi:leaf",
+                            "anti-condensation": "mdi:water-off",
+                            "extractor": "mdi:hvac",
+                            "heat_recovery": "mdi:recycle",
+                            "timer": "mdi:timer",
+                            "on": "mdi:hvac",
+                            "off": "mdi:hvac-off"
+                        }
+                    }
+                }
             }
         },
         "event": {

+ 17 - 0
custom_components/tuya_local/translations/bg.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Пречиствател на въздуха",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Автоматично",
+                            "manual": "Ръководство",
+                            "sleep": "Сън",
+                            "low": "Ниско",
+                            "medium": "Средно",
+                            "high": "Високо",
+                            "strong": "Силен",
+                            "displayoff": "Дисплеят е изключен"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Ароматизатор",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/ca.json

@@ -442,6 +442,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificador de aire",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Automático",
+                            "manual": "Manual",
+                            "sleep": "Dormir",
+                            "low": "Bajo",
+                            "medium": "Medio",
+                            "high": "Alto",
+                            "strong": "Fuerte",
+                            "displayoff": "Pantalla apagada"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Difusor d'aroma",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/cz.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Čistička vzduchu",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuál",
+                            "sleep": "Spát",
+                            "low": "Nízký",
+                            "medium": "Střední",
+                            "high": "Vysoký",
+                            "strong": "Silný",
+                            "displayoff": "Vypněte displej"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aroma difuzér",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/de.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Luftreiniger",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuell",
+                            "sleep": "Schlafen",
+                            "low": "Niedrig",
+                            "medium": "Mittel",
+                            "high": "Hoch",
+                            "strong": "Stark",
+                            "displayoff": "Anzeige aus"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aroma Diffuser",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/el.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Αφυγραντήρας",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Αυτόματο",
+                            "manual": "Χειροκίνητα",
+                            "sleep": "Αναμονή",
+                            "low": "Χαμηλή",
+                            "medium": "Μεσαία",
+                            "high": "Υψηλή",
+                            "strong": "Δυνατή",
+                            "displayoff": "Σβήσιμο οθόνης"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Αρωματικός διαχύτης",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/en.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Air purifier",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manual",
+                            "sleep": "Sleep",
+                            "low": "Low",
+                            "medium": "Medium",
+                            "high": "High",
+                            "strong": "Strong",
+                            "displayoff": "Display off"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aroma diffuser",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/es.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificador de aire",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manual",
+                            "sleep": "Dormir",
+                            "low": "Bajo",
+                            "medium": "Medio",
+                            "high": "Alto",
+                            "strong": "Fuerte",
+                            "displayoff": "Pantalla apagada"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Difusor de aroma",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/fr.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificateur d'air",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuel",
+                            "sleep": "Veille",
+                            "low": "Bas",
+                            "medium": "Moyen",
+                            "high": "Haut",
+                            "strong": "Fort",
+                            "displayoff": "Affichage désactivé"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Diffuseur d'arômes",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/hu.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Légtisztító",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuális",
+                            "sleep": "Alvás",
+                            "low": "Alacsony",
+                            "medium": "Közepes",
+                            "high": "Magas",
+                            "strong": "Erős",
+                            "displayoff": "Kijelző kikapcsolva"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aroma diffúzor",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/id.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Pembersih udara",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Otomatis",
+                            "manual": "Manual",
+                            "sleep": "Tidur",
+                            "low": "Rendah",
+                            "medium": "Sedang",
+                            "high": "Tinggi",
+                            "strong": "Kencang",
+                            "displayoff": "Layar mati"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Pengharum",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/it.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificatore d'aria",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuale",
+                            "sleep": "Sonno",
+                            "low": "Basso",
+                            "medium": "Medio",
+                            "high": "Alto",
+                            "strong": "Forte",
+                            "displayoff": "Display spento"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Diffusore di aromi",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/ja.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "空気清浄機",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "自動",
+                            "manual": "マニュアル",
+                            "sleep": "睡眠",
+                            "low": "低い",
+                            "medium": "中",
+                            "high": "高い",
+                            "strong": "強い",
+                            "displayoff": "ディスプレイオフ"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "アロマディフューザー",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Luft purifier",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuell",
+                            "sleep": "Søvn",
+                            "low": "Lav",
+                            "medium": "Medium",
+                            "high": "Høy",
+                            "strong": "Sterk",
+                            "displayoff": "Skjerm av"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aroma diffuser",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/pl.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Oczyszczacz powietrza",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Ręczny",
+                            "sleep": "Tryb snu",
+                            "low": "Niski",
+                            "medium": "Średni",
+                            "high": "Wysoki",
+                            "strong": "Silny",
+                            "displayoff": "Wyłączone podświetlanie"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Rozpylacz zapachów",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificador de ar",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manual",
+                            "sleep": "Dormir",
+                            "low": "Baixo",
+                            "medium": "Médio",
+                            "high": "Alto",
+                            "strong": "Forte",
+                            "displayoff": "Exibição desligada"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Difusor de aroma",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/pt-PT.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificador de ar",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manual",
+                            "sleep": "Dormir",
+                            "low": "Baixo",
+                            "medium": "Médio",
+                            "high": "Alto",
+                            "strong": "Forte",
+                            "displayoff": "Exibição desligada"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Difusor de aroma",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/ro.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Purificator de aer",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manual",
+                            "sleep": "Somn",
+                            "low": "Scăzut",
+                            "medium": "Mediu",
+                            "high": "Ridicat",
+                            "strong": "Puternic",
+                            "displayoff": "Afișaj oprit"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Difuzor aromă",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/ru.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Очиститель воздуха",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Авто",
+                            "manual": "Ручной",
+                            "sleep": "Сон",
+                            "low": "Низкий",
+                            "medium": "Средний",
+                            "high": "Высокий",
+                            "strong": "Сильный",
+                            "displayoff": "Дисплей выкл"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Аромадиффузор",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/sv.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Luftrenare",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Auto",
+                            "manual": "Manuell",
+                            "sleep": "Sömn",
+                            "low": "Låg",
+                            "medium": "Medel",
+                            "high": "Hög",
+                            "strong": "Stark",
+                            "displayoff": "Display av"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Aromadiffusor",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/uk.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "Очиститель воздуха",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "Авто",
+                            "manual": "Ручной",
+                            "sleep": "Сон",
+                            "low": "Низкий",
+                            "medium": "Средний",
+                            "high": "Высокий",
+                            "strong": "Сильный",
+                            "displayoff": "Дисплей выкл"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "Ароматизатор",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/ur.json

@@ -411,6 +411,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "ہوا صاف کرنے والا",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "خود کار",
+                            "manual": "دستی",
+                            "sleep": "سونا",
+                            "low": "کم",
+                            "medium": "درمیانہ",
+                            "high": "زیادہ",
+                            "strong": "مضبوط",
+                            "displayoff": "ڈسپلے آف"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "خوشبو پھیلانے والا",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "空气净化器",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "自动",
+                            "manual": "手动",
+                            "sleep": "睡眠",
+                            "low": "低",
+                            "medium": "中",
+                            "high": "高",
+                            "strong": "强劲",
+                            "displayoff": "关闭显示"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "香薰机",
                 "state_attributes": {

+ 17 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -410,6 +410,23 @@
             }
         },
         "fan": {
+            "air_purifier": {
+                "name": "空氣淨化器",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "auto": "自動",
+                            "manual": "手動",
+                            "sleep": "睡眠",
+                            "low": "低",
+                            "medium": "中",
+                            "high": "高",
+                            "strong": "強勁",
+                            "displayoff": "關閉顯示"
+                        }
+                    }
+                }
+            },
             "aroma_diffuser": {
                 "name": "香薰機",
                 "state_attributes": {