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

Fan: add translations for aroma diffusers.

- specific name
- icons
- presets: low, medium, high, continuous, intermittent

Issue #1708
Jason Rumney 1 год назад
Родитель
Сommit
95a8471fde
29 измененных файлов с 326 добавлено и 46 удалено
  1. 3 2
      custom_components/tuya_local/devices/asakuki_diffuser.yaml
  2. 4 9
      custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml
  3. 5 5
      custom_components/tuya_local/devices/ditua_dt1522yn_aromadiffuser.yaml
  4. 1 5
      custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml
  5. 1 1
      custom_components/tuya_local/devices/maxcio_aromadiffuser.yaml
  6. 3 3
      custom_components/tuya_local/devices/tesla_aroma_diffuser.yaml
  7. 4 9
      custom_components/tuya_local/devices/yx025wb_aromadiffuser.yaml
  8. 2 7
      custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml
  9. 1 5
      custom_components/tuya_local/devices/yym_805SW_aroma_nightlight.yaml
  10. 17 0
      custom_components/tuya_local/icons.json
  11. 15 0
      custom_components/tuya_local/translations/bg.json
  12. 15 0
      custom_components/tuya_local/translations/cz.json
  13. 15 0
      custom_components/tuya_local/translations/de.json
  14. 15 0
      custom_components/tuya_local/translations/el.json
  15. 15 0
      custom_components/tuya_local/translations/en.json
  16. 15 0
      custom_components/tuya_local/translations/es.json
  17. 15 0
      custom_components/tuya_local/translations/fr.json
  18. 15 0
      custom_components/tuya_local/translations/hu.json
  19. 15 0
      custom_components/tuya_local/translations/id.json
  20. 15 0
      custom_components/tuya_local/translations/it.json
  21. 15 0
      custom_components/tuya_local/translations/ja.json
  22. 15 0
      custom_components/tuya_local/translations/no-NB.json
  23. 15 0
      custom_components/tuya_local/translations/pl.json
  24. 15 0
      custom_components/tuya_local/translations/pt-BR.json
  25. 15 0
      custom_components/tuya_local/translations/ru.json
  26. 15 0
      custom_components/tuya_local/translations/uk.json
  27. 15 0
      custom_components/tuya_local/translations/ur.json
  28. 15 0
      custom_components/tuya_local/translations/zh-Hans.json
  29. 15 0
      custom_components/tuya_local/translations/zh-Hant.json

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

@@ -1,9 +1,10 @@
-name: Asakuki aroma diffuser
+name: Aroma diffuser
 products:
   - id: 6ASdNwe9IdaewQEl
+    name: Asakuki cube light
 primary_entity:
   entity: fan
-  icon: "mdi:scent"
+  translation_key: aroma_diffuser
   dps:
     - id: 11
       type: boolean

+ 4 - 9
custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml

@@ -1,27 +1,22 @@
 name: Aroma diffuser
 products:
   - id: 1sim2gu7dd5rh3j3
-    name: Cadence ultrasonic aroma diffuser
+    name: Cadence Ultrasonic
 primary_entity:
   entity: fan
-  translation_only_key: fan_with_presets
+  translation_key: aroma_diffuser
   dps:
     - id: 2
       name: switch
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: "mdi:scent"
-        - dps_val: false
-          icon: "mdi:scent-off"
     - id: 103
       name: preset_mode
       type: string
       mapping:
         - dps_val: continued
-          value: normal
+          value: continuous
         - dps_val: indirect
-          value: nature
+          value: intermittent
 secondary_entities:
   - entity: switch
     name: Power

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

@@ -6,7 +6,7 @@ products:
     name: Sierra Modern Home diffuser
 primary_entity:
   entity: fan
-  icon: "mdi:scent"
+  translation_key: aroma_diffuser
   dps:
     - id: 1
       type: boolean
@@ -23,10 +23,6 @@ primary_entity:
         - dps_val: null
           value: 0
           hidden: true
-    - id: 12
-      type: bitfield
-      name: fault_code
-      optional: true
 secondary_entities:
   - entity: light
     category: config
@@ -109,6 +105,10 @@ secondary_entities:
           - dps_val: null
             value: false
           - value: true
+      - id: 12
+        type: bitfield
+        name: fault_code
+        optional: true
   - entity: select
     translation_key: timer
     category: config

+ 1 - 5
custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml

@@ -3,15 +3,11 @@ products:
   - id: rvajlvjh4qoj1lkn
 primary_entity:
   entity: fan
+  translation_key: aroma_diffuser
   dps:
     - id: 2
       name: switch
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: mdi:scent
-        - dps_val: false
-          icon: mdi:scent-off
     - id: 3
       name: speed
       type: string

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

@@ -1,7 +1,7 @@
 name: Aroma diffuser
 primary_entity:
   entity: fan
-  icon: "mdi:scent"
+  translation_key: aroma_diffuser
   dps:
     - id: 1
       type: boolean

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

@@ -10,7 +10,7 @@ primary_entity:
       name: switch
 secondary_entities:
   - entity: fan
-    icon: "mdi:scent"
+    translation_key: aroma_diffuser
     dps:
       - id: 104
         type: boolean
@@ -20,9 +20,9 @@ secondary_entities:
         name: preset_mode
         mapping:
           - dps_val: "1"
-            value: Continuous
+            value: continuous
           - dps_val: "2"
-            value: Intermittent
+            value: intermittent
   - entity: light
     dps:
       - id: 11

+ 4 - 9
custom_components/tuya_local/devices/yx025wb_aromadiffuser.yaml

@@ -4,28 +4,23 @@ products:
     name: Liplasting YX-025WB
 primary_entity:
   entity: fan
-  icon: "mdi:scent"
+  translation_key: aroma_diffuser
   dps:
     - id: 2
       name: switch
       optional: true
       type: boolean
-      mapping:
-        - dps_val: false
-          icon: "mdi:scent-off"
-        - dps_val: true
-          icon: "mdi:scent"
     - id: 3
       type: string
       optional: true
       name: preset_mode
       mapping:
         - dps_val: small
-          value: small
+          value: low
         - dps_val: large
-          value: large
+          value: high
         - dps_val: interval
-          value: interval
+          value: intermittent
 secondary_entities:
   - entity: light
     icon: "mdi:light-recessed"

+ 2 - 7
custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml

@@ -6,16 +6,11 @@ products:
     name: YX316WIFI
 primary_entity:
   entity: fan
-  icon: "mdi:scent"
+  translation_key: aroma_diffuser
   dps:
     - id: 2
       name: switch
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: "mdi:scent"
-        - dps_val: false
-          icon: "mdi:scent-off"
     - id: 3
       type: string
       name: preset_mode
@@ -27,7 +22,7 @@ primary_entity:
         - dps_val: "4H"
           value: "high"
         - dps_val: "10SEC"
-          value: "10 seconds"
+          value: "intermittent"
     - id: 11
       name: fault_code
       type: bitfield

+ 1 - 5
custom_components/tuya_local/devices/yym_805SW_aroma_nightlight.yaml

@@ -10,15 +10,11 @@ products:
     name: Tellur
 primary_entity:
   entity: fan
+  translation_key: aroma_diffuser
   dps:
     - id: 1
       name: switch
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: "mdi:scent"
-        - dps_val: false
-          icon: "mdi:scent-off"
     - id: 2
       name: speed
       type: string

+ 17 - 0
custom_components/tuya_local/icons.json

@@ -32,6 +32,23 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "default": "mdi:scent",
+                "state": {
+                    "off": "mdi:scent-off"
+                },
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "mdi:signal-cellular-1",
+                            "medium": "mdi:signal-cellular-2",
+                            "high": "mdi:signal-cellular-3",
+                            "continuous": "mdi:clock-start",
+                            "intermittent": "mdi:timer-settings-outline"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Ароматизатор",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Ниско",
+                            "medium": "Средно",
+                            "high": "Високо",
+                            "continuous": "Непрекъснато",
+                            "intermittent": "Интервално"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Вентилация",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Aroma difuzér",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Nízký",
+                            "medium": "Střední",
+                            "high": "Vysoký",
+                            "continuous": "Nepřetržitý",
+                            "intermittent": "Přerušovaný"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilace",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Aroma Diffuser"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Niedrig",
+                            "medium": "Mittel",
+                            "high": "Hoch",
+                            "continuous": "Dauerbetrieb",
+                            "intermittent": "Intervall"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Lüftung",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Αρωματικός διαχύτης"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Χαμηλή",
+                            "medium": "Μεσαία",
+                            "high": "Υψηλή",
+                            "continuous": "Συνεχής",
+                            "intermittent": "Διακεκομμένη"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Αερισμός",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -277,6 +277,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Aroma diffuser",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Low",
+                            "medium": "Medium",
+                            "high": "High",
+                            "continuous": "Continuous",
+                            "intermittent": "Intermittent"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -295,6 +309,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilation",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Difusor de aroma"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Bajo",
+                            "medium": "Medio",
+                            "high": "Alto",
+                            "continuous": "Continuo",
+                            "intermittent": "Intermitente"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilación",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Diffuseur d'arômes",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Faible",
+                            "medium": "Moyen",
+                            "high": "Fort",
+                            "continuous": "Continu",
+                            "intermittent": "Intermittent"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilation",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Aroma diffúzor",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Alacsony",
+                            "medium": "Közepes",
+                            "high": "Magas",
+                            "continuous": "Folyamatos",
+                            "intermittent": "Időszakos"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Szellőzés",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Pengharum",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Rendah",
+                            "medium": "Sedang",
+                            "high": "Tinggi",
+                            "continuous": "Terus menerus",
+                            "intermittent": "Intermiten"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilasi",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Diffusore di aroma",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Basso",
+                            "medium": "Medio",
+                            "high": "Alto",
+                            "continuous": "Continuo",
+                            "intermittent": "Intermittente"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilazione",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "アロマディフューザー"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "低い",
+                            "medium": "中",
+                            "high": "高い",
+                            "continuous": "連続",
+                            "intermittent": "間欠"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "換気",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Aroma diffuser",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Lav",
+                            "medium": "Medium",
+                            "high": "Høy",
+                            "continuous": "Kontinuerlig",
+                            "intermittent": "Intermitterende"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilasjon",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Rozpylacz zapachów",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Niski",
+                            "medium": "Średni",
+                            "high": "Wysoki",
+                            "continuous": "Ciągły",
+                            "intermittent": "Przerywany"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Wentylacja",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Difusor de aroma",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Baixo",
+                            "medium": "Médio",
+                            "high": "Alto",
+                            "continuous": "Contínuo",
+                            "intermittent": "Intermitente"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Ventilação",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Аромадиффузор"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Низкий",
+                            "medium": "Средний",
+                            "high": "Высокий",
+                            "continuous": "Непрерывный",
+                            "intermittent": "Интервальный"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Вентиляция",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "Ароматизатор",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "Низький",
+                            "medium": "Середній",
+                            "high": "Високий",
+                            "continuous": "Постійний",
+                            "intermittent": "Інтермітентний"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "Вентиляція",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "خوشبو پھیلانے والا"
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "کم",
+                            "medium": "درمیانہ",
+                            "high": "زیادہ",
+                            "continuous": "مسلسل",
+                            "intermittent": "منقطع"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "ہوا کی رسائی",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -277,6 +277,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "香薰机",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "低",
+                            "medium": "中",
+                            "high": "高",
+                            "continuous": "连续",
+                            "intermittent": "间歇"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -295,6 +309,7 @@
                 }
             },
             "ventilation": {
+                "name": "通风",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {

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

@@ -230,6 +230,20 @@
             }
         },
         "fan": {
+            "aroma_diffuser": {
+                "name": "香薰機",
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "low": "低",
+                            "medium": "中",
+                            "high": "高",
+                            "continuous": "連續",
+                            "intermittent": "間歇"
+                        }
+                    }
+                }
+            },
             "fan_with_presets": {
                 "state_attributes": {
                     "preset_mode": {
@@ -248,6 +262,7 @@
                 }
             },
             "ventilation": {
+                "name": "通風系統",
                 "state_attributes": {
                     "preset_mode": {
                         "state": {