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

Siguro fan: standardize config

- use translations where available
- merge oscillation switch into fan entity

PR #3155
Jason Rumney 9 месяцев назад
Родитель
Сommit
9cdac9e825
1 измененных файлов с 15 добавлено и 15 удалено
  1. 15 15
      custom_components/tuya_local/devices/siguro_fan.yaml

+ 15 - 15
custom_components/tuya_local/devices/siguro_fan.yaml

@@ -1,10 +1,12 @@
-name: Siguro Fan
+name: Fan
 products:
   - id: ocajaux7xez7bpft
-    name: Siguro tower fan SGR-FN-U32xx
+    manufacturer: Siguro
+    model: SGR-FN-U32xx
+    name: Tower fan
 entities:
   - entity: fan
-    name: Fan
+    translation_key: fan_with_presets
     dps:
       - id: 1
         type: boolean
@@ -15,40 +17,36 @@ entities:
         range:
           min: 1
           max: 12
-        unit: ""
       - id: 3
         type: string
         name: preset_mode
         mapping:
           - dps_val: ordinary
-            value: Ordinary
+            value: normal
           - dps_val: nature
-            value: Nature
+            value: nature
           - dps_val: sleep
-            value: Sleep
-  - entity: switch
-    name: Oscillation
-    dps:
+            value: sleep
       - id: 5
         type: boolean
-        name: switch
+        name: oscillate
   - entity: switch
-    name: Ionizer
+    translation_key: ionizer
     category: config
     dps:
       - id: 8
         type: boolean
         name: switch
   - entity: light
-    name: Display
+    translation_key: display
     dps:
       - id: 12
         type: boolean
         name: switch
   - entity: number
-    name: Countdown Timer
+    translation_key: timer
     category: config
-    icon: "mdi:timer"
+    class: duration
     dps:
       - id: 14
         type: integer
@@ -60,6 +58,7 @@ entities:
   - entity: number
     name: On Timer
     category: config
+    class: duration
     icon: "mdi:timer-play"
     dps:
       - id: 102
@@ -72,6 +71,7 @@ entities:
   - entity: number
     name: Off Timer
     category: config
+    class: duration
     icon: "mdi:timer-off"
     dps:
       - id: 103