Browse Source

Mark fans with translation_key fan_with_presets

Based on the hassfest errors, it seems we cannot append to default
translations, so we need to use a translation_key to add translations
to the fan preset_mode values.

As the upstream does not have any translations, I suspect they have
not yet got to fans, and in future this may be able to be partially
reverted, or there may be more disruption when they choose different
presets (nature and sleep seem common enough that they will be
included, maybe with some variation on nature).

Issue #682
Jason Rumney 2 years ago
parent
commit
1ef10ab553
29 changed files with 29 additions and 1 deletions
  1. 1 0
      custom_components/tuya_local/devices/anko_fan.yaml
  2. 1 0
      custom_components/tuya_local/devices/arlec_12speed_tower_fan.yaml
  3. 1 0
      custom_components/tuya_local/devices/arlec_19speed_fan.yaml
  4. 1 0
      custom_components/tuya_local/devices/arlec_6speed_fan.yaml
  5. 1 0
      custom_components/tuya_local/devices/arlec_fan.yaml
  6. 1 0
      custom_components/tuya_local/devices/arlec_fan_light.yaml
  7. 1 0
      custom_components/tuya_local/devices/aspen_asp200_fan.yaml
  8. 1 0
      custom_components/tuya_local/devices/atomi_ceiling_fan.yaml
  9. 1 0
      custom_components/tuya_local/devices/breville_smart_air_viral_protect_plus.yaml
  10. 1 0
      custom_components/tuya_local/devices/breville_smartairconnect_purifier.yaml
  11. 1 0
      custom_components/tuya_local/devices/chanfok_fan_light.yaml
  12. 1 0
      custom_components/tuya_local/devices/electriq_cd20pro_dehumidifier.yaml
  13. 1 0
      custom_components/tuya_local/devices/electriq_cd25pro_dehumidifier.yaml
  14. 1 0
      custom_components/tuya_local/devices/goldair_fan.yaml
  15. 1 0
      custom_components/tuya_local/devices/himox_h05_purifier.yaml
  16. 1 0
      custom_components/tuya_local/devices/hosome_purifier.yaml
  17. 1 0
      custom_components/tuya_local/devices/immax_neo_light_vento.yaml
  18. 1 0
      custom_components/tuya_local/devices/lexy_f501_fan.yaml
  19. 1 0
      custom_components/tuya_local/devices/lifubide_x600_purifier.yaml
  20. 1 0
      custom_components/tuya_local/devices/poiema_one_purifier.yaml
  21. 1 0
      custom_components/tuya_local/devices/proscenic_a8_airpurifier.yaml
  22. 1 0
      custom_components/tuya_local/devices/renpho_rp_ap001s.yaml
  23. 1 0
      custom_components/tuya_local/devices/skyfan_dc_fan.yaml
  24. 1 0
      custom_components/tuya_local/devices/skyfan_fan_light.yaml
  25. 1 0
      custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml
  26. 1 0
      custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml
  27. 1 0
      custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml
  28. 1 0
      custom_components/tuya_local/devices/vork_vk6067aw_purifier.yaml
  29. 1 1
      custom_components/tuya_local/translations/en.json

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

@@ -1,6 +1,7 @@
 name: Anko fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -3,6 +3,7 @@ products:
   - id: rklgm99ldz4unh5s
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -4,6 +4,7 @@ products:
     name: Arlec 19-speed industrial wall fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -4,6 +4,7 @@ products:
     name: Arlec 45cm black floor fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -1,6 +1,7 @@
 name: ARLEC Grid Connect Fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -1,6 +1,7 @@
 name: ARLEC fan with light
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -2,6 +2,7 @@ name: Aspen fan
 legacy_type: aspen_fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -4,6 +4,7 @@ products:
     name: Atomi 52 inch ceiling fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 60
       type: boolean

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

@@ -3,6 +3,7 @@ products:
   - id: "emh1sylyfw7n2b50"
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -3,6 +3,7 @@ products:
   - id: tltdxtehttjbkjni
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -4,6 +4,7 @@ products:
     name: JST-DC-WYfen
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 60
       type: boolean

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

@@ -50,6 +50,7 @@ primary_entity:
       readonly: true
 secondary_entities:
   - entity: fan
+    translation_key: fan_with_presets
     dps:
       - id: 1
         type: boolean

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

@@ -48,6 +48,7 @@ primary_entity:
       readonly: true
 secondary_entities:
   - entity: fan
+    translation_key: fan_with_presets
     dps:
       - id: 1
         type: boolean

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

@@ -2,6 +2,7 @@ name: Goldair fan
 legacy_type: fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -1,6 +1,7 @@
 name: Himox H05 air purifier
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -3,6 +3,7 @@ products:
   - id: sferhht3hjkc942e
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -4,6 +4,7 @@ products:
     name: Immax NEO LITE VENTO Smart
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -3,6 +3,7 @@ products:
   - id: unqopjvzu4ut6hb0
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -4,6 +4,7 @@ products:
     name: Lifubide X600
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -4,6 +4,7 @@ products:
 primary_entity:
   entity: fan
   icon: "mdi:air-purifier"
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -5,6 +5,7 @@ products:
 primary_entity:
   entity: fan
   icon: "mdi:air-purifier"
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -4,6 +4,7 @@ products:
 primary_entity:
   entity: fan
   icon: "mdi:air-purifier"
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -3,6 +3,7 @@ products:
   - id: vzj97d3m05yjhchn
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -4,6 +4,7 @@ products:
     name: Skyfan DC fan with light
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -1,6 +1,7 @@
 name: Stirling FS1-40DC pedestal fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -3,6 +3,7 @@ products:
   - id: sgodozglgymucvq2
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -3,6 +3,7 @@ products:
   - id: 3hjcrjktvkoim7zu
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean

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

@@ -4,6 +4,7 @@ products:
 primary_entity:
   entity: fan
   icon: "mdi:air-purifier"
+  translation_key: fan_with_presets
   dps:
     - id: 1
       name: switch

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

@@ -165,7 +165,7 @@
             }
         },
         "fan": {
-            "_": {
+            "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
                         "state": {