소스 검색

Goldair platinum tower fan: use translations for presets

This requires an additional preset in the translations for child mode.
Jason Rumney 2 년 전
부모
커밋
7ecd006298
2개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml
  2. 1 0
      custom_components/tuya_local/translations/en.json

+ 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",