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

Goldair platinum tower fan: use translations for presets

This requires an additional preset in the translations for child mode.
Jason Rumney 2 лет назад
Родитель
Сommit
7ecd006298

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

@@ -4,6 +4,7 @@ products:
     name: Goldair Platinum Tower Fan
 primary_entity:
   entity: fan
+  translation_key: fan_with_presets
   dps:
     - id: 1
       type: boolean
@@ -13,13 +14,13 @@ primary_entity:
       name: preset_mode
       mapping:
         - dps_val: 1
-          value: Normal
+          value: normal
         - dps_val: 2
-          value: Nature
+          value: nature
         - dps_val: 3
-          value: Sleep
+          value: sleep
         - dps_val: 4
-          value: Child
+          value: child
     - id: 3
       type: integer
       name: speed

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

@@ -172,6 +172,7 @@
                             "normal": "Normal",
                             "nature": "Natural",
                             "sleep": "Sleep",
+                            "child": "Child",
                             "fresh": "Fresh",
                             "smart": "Smart",
                             "strong": "Strong",