Răsfoiți Sursa

Use cloud device name as default suggestion in config flow (#4652)

* Use cloud device name as default suggestion in config flow

When a device is added via the cloud API path, the user-assigned device
name from the Tuya cloud is now used as the default name suggestion
instead of the generic device type name. Falls back to the device type
name when cloud data is unavailable.

* Show cloud device name in config flow step descriptions

When adding a device via cloud-assisted flow, display the device name
and product name (e.g. "Living Room Light — Smart Bulb") as bold text
at the top of each step's description. Falls back to empty string for
manual flow, keeping descriptions unchanged.

* Add {device_name} placeholder to config flow step descriptions
kongo09 2 zile în urmă
părinte
comite
cef84548f5
25 a modificat fișierele cu 153 adăugiri și 121 ștergeri
  1. 36 4
      custom_components/tuya_local/config_flow.py
  2. 5 5
      custom_components/tuya_local/translations/bg.json
  3. 5 5
      custom_components/tuya_local/translations/ca.json
  4. 5 5
      custom_components/tuya_local/translations/cz.json
  5. 5 5
      custom_components/tuya_local/translations/de.json
  6. 5 5
      custom_components/tuya_local/translations/el.json
  7. 5 5
      custom_components/tuya_local/translations/en.json
  8. 5 5
      custom_components/tuya_local/translations/es.json
  9. 5 5
      custom_components/tuya_local/translations/fr.json
  10. 5 5
      custom_components/tuya_local/translations/hu.json
  11. 5 5
      custom_components/tuya_local/translations/id.json
  12. 5 5
      custom_components/tuya_local/translations/it.json
  13. 5 5
      custom_components/tuya_local/translations/ja.json
  14. 5 5
      custom_components/tuya_local/translations/no-NB.json
  15. 5 5
      custom_components/tuya_local/translations/pl.json
  16. 5 5
      custom_components/tuya_local/translations/pt-BR.json
  17. 5 5
      custom_components/tuya_local/translations/pt-PT.json
  18. 5 5
      custom_components/tuya_local/translations/ro.json
  19. 5 5
      custom_components/tuya_local/translations/ru.json
  20. 5 5
      custom_components/tuya_local/translations/sv.json
  21. 5 5
      custom_components/tuya_local/translations/uk.json
  22. 5 5
      custom_components/tuya_local/translations/ur.json
  23. 5 5
      custom_components/tuya_local/translations/zh-Hans.json
  24. 5 5
      custom_components/tuya_local/translations/zh-Hant.json
  25. 2 2
      tests/test_config_flow.py

+ 36 - 4
custom_components/tuya_local/config_flow.py

@@ -293,6 +293,17 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
             last_step=False,
         )
 
+    @property
+    def _device_name_placeholder(self) -> str:
+        """Return device name placeholder for step descriptions."""
+        if self.__cloud_device and self.__cloud_device.get("product_name"):
+            parts = []
+            if self.__cloud_device.get("name"):
+                parts.append(self.__cloud_device["name"])
+            parts.append(self.__cloud_device["product_name"])
+            return "**" + " — ".join(parts) + "**\n\n"
+        return ""
+
     async def async_step_search(self, user_input=None):
         if user_input is not None:
             # Current IP is the WAN IP which is of no use. Need to try and discover to the local IP.
@@ -325,7 +336,13 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
             return await self.async_step_local()
 
         return self.async_show_form(
-            step_id="search", data_schema=vol.Schema({}), errors={}, last_step=False
+            step_id="search",
+            data_schema=vol.Schema({}),
+            description_placeholders={
+                "device_name": self._device_name_placeholder,
+            },
+            errors={},
+            last_step=False,
         )
 
     async def async_step_local(self, user_input=None):
@@ -405,7 +422,10 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
                     vol.Optional(CONF_DEVICE_CID, **devcid_opts): str,
                 }
             ),
-            description_placeholders={"device_details_url": DEVICE_DETAILS_URL},
+            description_placeholders={
+                "device_details_url": DEVICE_DETAILS_URL,
+                "device_name": self._device_name_placeholder,
+            },
             errors=errors,
         )
 
@@ -507,11 +527,17 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
                 return self.async_show_form(
                     step_id="select_type_auto_detected",
                     data_schema=schema,
-                    description_placeholders={"detected_protocol": str(detected)},
+                    description_placeholders={
+                        "detected_protocol": str(detected),
+                        "device_name": self._device_name_placeholder,
+                    },
                 )
             return self.async_show_form(
                 step_id="select_type",
                 data_schema=schema,
+                description_placeholders={
+                    "device_name": self._device_name_placeholder,
+                },
             )
         else:
             return self.async_abort(reason="not_supported")
@@ -530,11 +556,17 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
             return self.async_create_entry(
                 title=title, data={**self.data, **user_input}
             )
-        schema = {vol.Required(CONF_NAME, default=config.name): str}
+        default_name = config.name
+        if self.__cloud_device and self.__cloud_device.get("name"):
+            default_name = self.__cloud_device["name"]
+        schema = {vol.Required(CONF_NAME, default=default_name): str}
 
         return self.async_show_form(
             step_id="choose_entities",
             data_schema=vol.Schema(schema),
+            description_placeholders={
+                "device_name": self._device_name_placeholder,
+            },
         )
 
     @staticmethod

+ 5 - 5
custom_components/tuya_local/translations/bg.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Намерете IP адреса на устройството",
-                "description": "Облакът Tuya не предоставя локални IP адреси"
+                "description": "{device_name}Облакът Tuya не предоставя локални IP адреси"
             },
             "local": {
                 "title": "Конфигуриране на вашето Tuya Local устройство",
-                "description": "[Следвайте тези инструкции, за да откриете идентификатора на вашето устройство и локалния ключ]({device_details_url}).",
+                "description": "{device_name}[Следвайте тези инструкции, за да откриете идентификатора на вашето устройство и локалния ключ]({device_details_url}).",
                 "data": {
                     "host": "IP адрес или име на хост",
                     "device_id": "Device ID (или Device ID шлюза, за устройства свързани чрез шлюз)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Изберете типа на устройството",
-                "description": "Изберете типа, който съответства на вашето устройство",
+                "description": "{device_name}Изберете типа, който съответства на вашето устройство",
                 "data": {
                     "type": "Тип устройство"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Изберете типа на устройството",
-                "description": "Изберете типа, който съответства на вашето устройство. Версията на протокола {detected_protocol} беше автоматично открита и запазена. Ако в бъдеще актуализирате фърмуера на устройството, може да се наложи да конфигурирате отново тази интеграция.",
+                "description": "{device_name}Изберете типа, който съответства на вашето устройство. Версията на протокола {detected_protocol} беше автоматично открита и запазена. Ако в бъдеще актуализирате фърмуера на устройството, може да се наложи да конфигурирате отново тази интеграция.",
                 "data": {
                     "type": "Тип устройство"
                 }
             },
             "choose_entities": {
                 "title": "Подробности за устройството",
-                "description": "Изберете име за това устройство",
+                "description": "{device_name}Изберете име за това устройство",
                 "data": {
                     "name": "Име"
                 }

+ 5 - 5
custom_components/tuya_local/translations/ca.json

@@ -29,11 +29,11 @@
             },
             "search": {
                 "title": "Localitzeu l'adreça IP del dispositiu",
-                "description": "Tuya cloud no proporciona adreces IP locals, per tant, ara hem de cercar a la vostra xarxa local per a trobar el dispositiu. Això triga fins a 20 segons.\n\nSi no teniu èxit, haureu de proporcionar l'adreça IP vós mateix d'alguna altra manera, com ara des de l'assignació DHCP de l'encaminador.\n\nPer a aquest pas i que pugueu afegir amb èxit el dispositiu, heu de tancar l'aplicació mòbil o les seves connexions al dispositiu sovint bloquejarà la comunicació Tuya Local amb ells."
+                "description": "{device_name}Tuya cloud no proporciona adreces IP locals, per tant, ara hem de cercar a la vostra xarxa local per a trobar el dispositiu. Això triga fins a 20 segons.\n\nSi no teniu èxit, haureu de proporcionar l'adreça IP vós mateix d'alguna altra manera, com ara des de l'assignació DHCP de l'encaminador.\n\nPer a aquest pas i que pugueu afegir amb èxit el dispositiu, heu de tancar l'aplicació mòbil o les seves connexions al dispositiu sovint bloquejarà la comunicació Tuya Local amb ells."
             },
             "local": {
                 "title": "Configureu el vostre dispositiu Tuya Local",
-                "description": "[Seguiu aquestes instruccions per a trobar l'identificador del dispositiu i la clau local.]({device_details_url})",
+                "description": "{device_name}[Seguiu aquestes instruccions per a trobar l'identificador del dispositiu i la clau local.]({device_details_url})",
                 "data": {
                     "host": "Adreça IP o nom d'amfitrió",
                     "device_id": "ID del dispositiu (o ID del dispositiu del centre per a dispositius connectats a través de la passarel·la)",
@@ -45,21 +45,21 @@
             },
             "select_type": {
                 "title": "Trieu el tipus de dispositiu",
-                "description": "Trieu el tipus que coincideix amb el vostre dispositiu",
+                "description": "{device_name}Trieu el tipus que coincideix amb el vostre dispositiu",
                 "data": {
                     "type": "Tipus de dispositiu"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Trieu el tipus de dispositiu",
-                "description": "Trieu el tipus que coincideix amb el vostre dispositiu. La versión de protocolo {detected_protocol} se detectó automáticamente y se guardó. Si actualiza el firmware del dispositivo en el futuro, es posible que deba reconfigurar esta integración.",
+                "description": "{device_name}Trieu el tipus que coincideix amb el vostre dispositiu. La versión de protocolo {detected_protocol} se detectó automáticamente y se guardó. Si actualiza el firmware del dispositivo en el futuro, es posible que deba reconfigurar esta integración.",
                 "data": {
                     "type": "Tipus de dispositiu"
                 }
             },
             "choose_entities": {
                 "title": "Detalls del dispositiu",
-                "description": "Trieu un nom per a aquest dispositiu",
+                "description": "{device_name}Trieu un nom per a aquest dispositiu",
                 "data": {
                     "name": "Nom"
                 }

+ 5 - 5
custom_components/tuya_local/translations/cz.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Najděte IP adresu zařízení",
-                "description": "Cloud Tuya neposkytuje místní IP adresy"
+                "description": "{device_name}Cloud Tuya neposkytuje místní IP adresy"
             },
             "local": {
                 "title": "Nastavte sve lokální zařízení",
-                "description": "[Postupujte podle tohoto návodu pro získaní identifikátoru zařízení (device_id) a lokálního klíče (local_key).]({device_details_url})",
+                "description": "{device_name}[Postupujte podle tohoto návodu pro získaní identifikátoru zařízení (device_id) a lokálního klíče (local_key).]({device_details_url})",
                 "data": {
                     "host": "IP adresa nebo název hostitele (hostname)",
                     "device_id": "identifikátor zařízení (device_id, nebo device_id brány pro zařízení připojená pomocí brány) ",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Vyberte typ zařízení",
-                "description": "vyberte typ odpovídající vašemu zařízení",
+                "description": "{device_name}vyberte typ odpovídající vašemu zařízení",
                 "data": {
                     "type": "Typ zařízení"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Vyberte typ zařízení",
-                "description": "Vyberte typ, který odpovídá vašemu zařízení. Verze protokolu {detected_protocol} byla automaticky detekována a uložena. Pokud v budoucnu aktualizujete firmware zařízení, možná budete muset tuto integraci znovu nakonfigurovat.",
+                "description": "{device_name}Vyberte typ, který odpovídá vašemu zařízení. Verze protokolu {detected_protocol} byla automaticky detekována a uložena. Pokud v budoucnu aktualizujete firmware zařízení, možná budete muset tuto integraci znovu nakonfigurovat.",
                 "data": {
                     "type": "Typ zařízení"
                 }
             },
             "choose_entities": {
                 "title": "Podrobnosti o zařízení",
-                "description": "Vyberte jméno pro toto zařízení",
+                "description": "{device_name}Vyberte jméno pro toto zařízení",
                 "data": {
                     "name": "Jméno"
                 }

+ 5 - 5
custom_components/tuya_local/translations/de.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Suchen Sie die IP-Adresse des Geräts",
-                "description": "Die Tuya-Cloud stellt keine lokalen IP-Adressen bereit"
+                "description": "{device_name}Die Tuya-Cloud stellt keine lokalen IP-Adressen bereit"
             },
             "local": {
                 "title": "Konfigurieren Sie Ihr Tuya Local-Gerät",
-                "description": "[Folgen Sie diesen Anweisungen, um Ihre Geräte-ID und Ihren lokalen Schlüssel zu finden.]({device_details_url})",
+                "description": "{device_name}[Folgen Sie diesen Anweisungen, um Ihre Geräte-ID und Ihren lokalen Schlüssel zu finden.]({device_details_url})",
                 "data": {
                     "host": "IP-Adresse oder Host-Name",
                     "device_id": "Geräte-ID (device_id, oder device_id des Gateways für Geräte, die über ein Gateway angeschlossen sind)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Wählen Sie den Gerätetyp aus",
-                "description": "Wählen Sie den für Ihr Gerät geeigneten Typ aus.",
+                "description": "{device_name}Wählen Sie den für Ihr Gerät geeigneten Typ aus.",
                 "data": {
                     "type": "Gerätetyp"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Wählen Sie den Gerätetyp aus",
-                "description": "Wählen Sie den Typ aus, der Ihrem Gerät entspricht. Protokollversion {detected_protocol} wurde automatisch erkannt und gespeichert. Wenn Sie die Geräte-Firmware in Zukunft aktualisieren, müssen Sie diese Integration möglicherweise neu konfigurieren.",
+                "description": "{device_name}Wählen Sie den Typ aus, der Ihrem Gerät entspricht. Protokollversion {detected_protocol} wurde automatisch erkannt und gespeichert. Wenn Sie die Geräte-Firmware in Zukunft aktualisieren, müssen Sie diese Integration möglicherweise neu konfigurieren.",
                 "data": {
                     "type": "Gerätetyp"
                 }
             },
             "choose_entities": {
                 "title": "Gerätename",
-                "description": "Wählen Sie einen Namen für dieses Gerät aus.",
+                "description": "{device_name}Wählen Sie einen Namen für dieses Gerät aus.",
                 "data": {
                     "name": "Gerätename"
                 }

+ 5 - 5
custom_components/tuya_local/translations/el.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Βρείτε τη διεύθυνση IP της συσκευής",
-                "description": "Το Tuya cloud δεν παρέχει τοπικές διευθύνσεις IP, οπότε τώρα πρέπει να ψάξουμε στο τοπικό σας δίκτυο για να βρούμε τη συσκευή. Αυτό μπορεί να διαρκέσει μέχρι και 20 δευτερόλεπτα.\n\nΑν αποτύχει θα πρέπει να παρέχετε εσείς τη διεύθυνση IP με κάποιο άλλο τρόπο, όπως για παράδειγμα από το DHCP assignment του ρούτερ σας.\n\nΓια αυτό το βήμα και την προσθήκη συσκευής που ακολουθεί πρέπει να κλείσετε την εφαρμογή του κινητού σας, αλλιώς οι συνδέσεις του προς τις συσκευές συχνά εμποδίζουν το Tuya Local να επικοινωνήσει μαζί τους."
+                "description": "{device_name}Το Tuya cloud δεν παρέχει τοπικές διευθύνσεις IP, οπότε τώρα πρέπει να ψάξουμε στο τοπικό σας δίκτυο για να βρούμε τη συσκευή. Αυτό μπορεί να διαρκέσει μέχρι και 20 δευτερόλεπτα.\n\nΑν αποτύχει θα πρέπει να παρέχετε εσείς τη διεύθυνση IP με κάποιο άλλο τρόπο, όπως για παράδειγμα από το DHCP assignment του ρούτερ σας.\n\nΓια αυτό το βήμα και την προσθήκη συσκευής που ακολουθεί πρέπει να κλείσετε την εφαρμογή του κινητού σας, αλλιώς οι συνδέσεις του προς τις συσκευές συχνά εμποδίζουν το Tuya Local να επικοινωνήσει μαζί τους."
             },
             "local": {
                 "title": "Ρυθμίστε τη συσκευή σας Tuya Local",
-                "description": "[Ακολουθήστε αυτές τις οδηγίες για να βρείτε το device id και το local key.]({device_details_url})",
+                "description": "{device_name}[Ακολουθήστε αυτές τις οδηγίες για να βρείτε το device id και το local key.]({device_details_url})",
                 "data": {
                     "host": "Διεύθυνση IP ή όνομα",
                     "device_id": "Device ID (ή device_id της gateway για συσκευές συνδεδεμένες μέσω gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Επιλέξτε τον τύπο της συσκευής",
-                "description": "Επιλέξτε τον τύπο που ταιριάζει στη συσκευή σας",
+                "description": "{device_name}Επιλέξτε τον τύπο που ταιριάζει στη συσκευή σας",
                 "data": {
                     "type": "Τύπος συσκευής"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Επιλέξτε τον τύπο της συσκευής",
-                "description": "Επιλέξτε τον τύπο που ταιριάζει στη συσκευή σας. Η έκδοση πρωτοκόλλου {detected_protocol} ανιχνεύθηκε αυτόματα και αποθηκεύτηκε. Εάν ενημερώσετε το υλικολογισμικό της συσκευής στο μέλλον, ίσως χρειαστεί να επαναδιαμορφώσετε αυτήν την ενσωμάτωση.",
+                "description": "{device_name}Επιλέξτε τον τύπο που ταιριάζει στη συσκευή σας. Η έκδοση πρωτοκόλλου {detected_protocol} ανιχνεύθηκε αυτόματα και αποθηκεύτηκε. Εάν ενημερώσετε το υλικολογισμικό της συσκευής στο μέλλον, ίσως χρειαστεί να επαναδιαμορφώσετε αυτήν την ενσωμάτωση.",
                 "data": {
                     "type": "Τύπος συσκευής"
                 }
             },
             "choose_entities": {
                 "title": "Λεπτομέρειες συσκευής",
-                "description": "Επιλέξτε ένα όνομα για αυτή τη συσκευή",
+                "description": "{device_name}Επιλέξτε ένα όνομα για αυτή τη συσκευή",
                 "data": {
                     "name": "Όνομα"
                 }

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

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Locate the device IP address",
-                "description": "Tuya cloud does not provide local IP addresses so we must now search your local network to find the device. This takes up to 20 seconds.\n\nIf unsuccessful you will need to provide the IP address yourself some other way such as from router DHCP assignment.\n\nFor this step and the following device addition to succeed you must shut down the mobile app or its connections to the device will often block Tuya Local communication with them."
+                "description": "{device_name}Tuya cloud does not provide local IP addresses so we must now search your local network to find the device. This takes up to 20 seconds.\n\nIf unsuccessful you will need to provide the IP address yourself some other way such as from router DHCP assignment.\n\nFor this step and the following device addition to succeed you must shut down the mobile app or its connections to the device will often block Tuya Local communication with them."
             },
             "local": {
                 "title": "Configure your Tuya Local device",
-                "description": "[Follow these instructions to find your device id and local key.]({device_details_url})",
+                "description": "{device_name}[Follow these instructions to find your device id and local key.]({device_details_url})",
                 "data": {
                     "host": "IP address or hostname",
                     "device_id": "Device ID (or the hub's Device ID for devices connected via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Choose the type of device",
-                "description": "Choose the type that matches your device.",
+                "description": "{device_name}Choose the type that matches your device.",
                 "data": {
                     "type": "Device type"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Choose the type of device",
-                "description": "Choose the type that matches your device. Protocol version {detected_protocol} was automatically detected and saved. If you update the device firmware in the future, you may need to reconfigure this integration.",
+                "description": "{device_name}Choose the type that matches your device. Protocol version {detected_protocol} was automatically detected and saved. If you update the device firmware in the future, you may need to reconfigure this integration.",
                 "data": {
                     "type": "Device type"
                 }
             },
             "choose_entities": {
                 "title": "Device details",
-                "description": "Choose a name for this device",
+                "description": "{device_name}Choose a name for this device",
                 "data": {
                     "name": "Name"
                 }

+ 5 - 5
custom_components/tuya_local/translations/es.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Localice la dirección IP del dispositivo",
-                "description": "Tuya Cloud no proporciona direcciones IP locales por lo que ahora debemos buscar en su red local para encontrar el dispositivo. "
+                "description": "{device_name}Tuya Cloud no proporciona direcciones IP locales por lo que ahora debemos buscar en su red local para encontrar el dispositivo. "
             },
             "local": {
                 "title": "Configura tu dispositivo Tuya Local",
-                "description": "[Siga estas instrucciones para encontrar la identificación de su dispositivo y la clave local.]({device_details_url})",
+                "description": "{device_name}[Siga estas instrucciones para encontrar la identificación de su dispositivo y la clave local.]({device_details_url})",
                 "data": {
                     "host": "Dirección IP o nombre de host",
                     "device_id": "Identificación del dispositivo (device_id, o device_id de la puerta de enlace para dispositivos conectados a través de una puerta de enlace)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Elige el tipo de dispositivo",
-                "description": "Elija el tipo que coincida con su dispositivo",
+                "description": "{device_name}Elija el tipo que coincida con su dispositivo",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Elige el tipo de dispositivo",
-                "description": "Elija el tipo que coincida con su dispositivo. La versión del protocolo {detected_protocol} se detectó automáticamente y se guardó. Si actualiza el firmware del dispositivo en el futuro, es posible que deba reconfigurar esta integración.",
+                "description": "{device_name}Elija el tipo que coincida con su dispositivo. La versión del protocolo {detected_protocol} se detectó automáticamente y se guardó. Si actualiza el firmware del dispositivo en el futuro, es posible que deba reconfigurar esta integración.",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "choose_entities": {
                 "title": "Detalles del dispositivo",
-                "description": "Elija un nombre para este dispositivo",
+                "description": "{device_name}Elija un nombre para este dispositivo",
                 "data": {
                     "name": "Nombre"
                 }

+ 5 - 5
custom_components/tuya_local/translations/fr.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Localisez l'adresse IP de l'appareil",
-                "description": "Tuya cloud ne fournit pas d'adresses IP locales"
+                "description": "{device_name}Tuya cloud ne fournit pas d'adresses IP locales"
             },
             "local": {
                 "title": "Configurer votre appareil Tuya Local",
-                "description": "[Suivre ces instructions pour trouver le 'device id' et la 'local key'.]({device_details_url})",
+                "description": "{device_name}[Suivre ces instructions pour trouver le 'device id' et la 'local key'.]({device_details_url})",
                 "data": {
                     "host": "Adresse IP ou Nom d'hote",
                     "device_id": "Device ID (ou device_id de la passerelle pour les appareils connectés via une passerelle)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Choisissez le type d'appareil",
-                "description": "Choisissez le type qui correspond à votre appareil",
+                "description": "{device_name}Choisissez le type qui correspond à votre appareil",
                 "data": {
                     "type": "Type d'appareil"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Choisissez le type d'appareil",
-                "description": "Choisissez le type qui correspond à votre appareil. La version du protocole {detected_protocol} a été automatiquement détectée et enregistrée. Si vous mettez à jour le firmware de l'appareil à l'avenir, vous devrez peut-être reconfigurer cette intégration.",
+                "description": "{device_name}Choisissez le type qui correspond à votre appareil. La version du protocole {detected_protocol} a été automatiquement détectée et enregistrée. Si vous mettez à jour le firmware de l'appareil à l'avenir, vous devrez peut-être reconfigurer cette intégration.",
                 "data": {
                     "type": "Type d'appareil"
                 }
             },
             "choose_entities": {
                 "title": "Details appareil",
-                "description": "Choisissez un nom pour cet appareil",
+                "description": "{device_name}Choisissez un nom pour cet appareil",
                 "data": {
                     "name": "Nom"
                 }

+ 5 - 5
custom_components/tuya_local/translations/hu.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Keresse meg az eszköz IP-címét",
-                "description": "A Tuya felhő nem biztosít helyi IP-címeket"
+                "description": "{device_name}A Tuya felhő nem biztosít helyi IP-címeket"
             },
             "local": {
                 "title": "Állítsd be a helyi Tuya eszközöd",
-                "description": "[Kövesd ezeket az utasításokat, hogy megtaláld az eszköz azonosítóját (device_id) és a helyi kulcsot (local_key).]({device_details_url})",
+                "description": "{device_name}[Kövesd ezeket az utasításokat, hogy megtaláld az eszköz azonosítóját (device_id) és a helyi kulcsot (local_key).]({device_details_url})",
                 "data": {
                     "host": "IP cím vagy állomásnév",
                     "device_id": "Eszköz azonosító (device_id, vagy átjáró device_id)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Válaszd ki az eszköz típusát",
-                "description": "Válaszd ki azt a típust, amelyik legjobban illik az eszközödhöz",
+                "description": "{device_name}Válaszd ki azt a típust, amelyik legjobban illik az eszközödhöz",
                 "data": {
                     "type": "Eszköz típus"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Válaszd ki az eszköz típusát",
-                "description": "Válaszd ki azt a típust, amelyik legjobban illik az eszközödhöz. A {detected_protocol} protokoll verzió automatikusan észlelve és elmentve. Ha a jövőben frissíted az eszköz firmware-jét, előfordulhat, hogy újra kell konfigurálnod ezt az integrációt.",
+                "description": "{device_name}Válaszd ki azt a típust, amelyik legjobban illik az eszközödhöz. A {detected_protocol} protokoll verzió automatikusan észlelve és elmentve. Ha a jövőben frissíted az eszköz firmware-jét, előfordulhat, hogy újra kell konfigurálnod ezt az integrációt.",
                 "data": {
                     "type": "Eszköz típus"
                 }
             },
             "choose_entities": {
                 "title": "Eszköz részletei",
-                "description": "Válasz egy nevet az eszköznek",
+                "description": "{device_name}Válasz egy nevet az eszköznek",
                 "data": {
                     "name": "Név"
                 }

+ 5 - 5
custom_components/tuya_local/translations/id.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Temukan alamat IP perangkat",
-                "description": "Tuya cloud tidak menyediakan alamat IP lokal jadi sekarang kami harus mencari di jaringan lokal Anda untuk menemukan perangkat. "
+                "description": "{device_name}Tuya cloud tidak menyediakan alamat IP lokal jadi sekarang kami harus mencari di jaringan lokal Anda untuk menemukan perangkat. "
             },
             "local": {
                 "title": "Konfigurasikan perangkat Tuya Local Anda",
-                "description": "[Ikuti petunjuk ini untuk menemukan ID perangkat dan kunci lokal.]({device_details_url})",
+                "description": "{device_name}[Ikuti petunjuk ini untuk menemukan ID perangkat dan kunci lokal.]({device_details_url})",
                 "data": {
                     "host": "Alamat IP atau nama hos",
                     "device_id": "ID Perangkat (device_id, atau device_id dari gateway untuk perangkat yang tersambung via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Pilih tipe perangkat",
-                "description": "Pilih tipe yang cocok dengan perangkat Anda",
+                "description": "{device_name}Pilih tipe yang cocok dengan perangkat Anda",
                 "data": {
                     "type": "Tipe perangkat"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Pilih tipe perangkat",
-                "description": "Pilih tipe yang cocok dengan perangkat Anda. Versi protokol {detected_protocol} terdeteksi secara otomatis dan disimpan. Jika Anda memperbarui firmware perangkat di masa mendatang, Anda mungkin perlu mengkonfigurasi ulang integrasi ini.",
+                "description": "{device_name}Pilih tipe yang cocok dengan perangkat Anda. Versi protokol {detected_protocol} terdeteksi secara otomatis dan disimpan. Jika Anda memperbarui firmware perangkat di masa mendatang, Anda mungkin perlu mengkonfigurasi ulang integrasi ini.",
                 "data": {
                     "type": "Tipe perangkat"
                 }
             },
             "choose_entities": {
                 "title": "Detail perangkat",
-                "description": "Buat nama untuk perangkat ini",
+                "description": "{device_name}Buat nama untuk perangkat ini",
                 "data": {
                     "name": "Nama"
                 }

+ 5 - 5
custom_components/tuya_local/translations/it.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Individuazione indirizzo IP del dispositivo",
-                "description": "Tuya cloud non fornisce indirizzi IP locali, quindi ora dobbiamo cercare nella rete locale per trovare il dispositivo. Potrebbero volerci fino a 20 secondi.\n\nQualora dovesse non andare a buon fine, inserisci l'indirizzo IP del dispositivo manualmente.\n\nPer garantire la corretta esecuzione di questo passo e la successiva aggiunta del dispositivo chiudi l'app Tuya."
+                "description": "{device_name}Tuya cloud non fornisce indirizzi IP locali, quindi ora dobbiamo cercare nella rete locale per trovare il dispositivo. Potrebbero volerci fino a 20 secondi.\n\nQualora dovesse non andare a buon fine, inserisci l'indirizzo IP del dispositivo manualmente.\n\nPer garantire la corretta esecuzione di questo passo e la successiva aggiunta del dispositivo chiudi l'app Tuya."
             },
             "local": {
                 "title": "Configura il tuo dispositivo Tuya Local",
-                "description": "[Segui queste istruzioni per trovare 'device id' e 'local key'.]({device_details_url})",
+                "description": "{device_name}[Segui queste istruzioni per trovare 'device id' e 'local key'.]({device_details_url})",
                 "data": {
                     "host": "Indirizzo IP o hostname",
                     "device_id": "Device ID (oppure Device ID dell'hub per dispositivi connessi tramite gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Scegli il tipo di dispositivo",
-                "description": "Seleziona il tipo che corrisponde al tuo dispositivo",
+                "description": "{device_name}Seleziona il tipo che corrisponde al tuo dispositivo",
                 "data": {
                     "type": "Tipo dispositivo"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Scegli il tipo di dispositivo",
-                "description": "Scegli il tipo che corrisponde al tuo dispositivo. La versione del protocollo {detected_protocol} è stata rilevata automaticamente e salvata. Se aggiorni il firmware del dispositivo in futuro, potresti dover riconfigurare questa integrazione.",
+                "description": "{device_name}Scegli il tipo che corrisponde al tuo dispositivo. La versione del protocollo {detected_protocol} è stata rilevata automaticamente e salvata. Se aggiorni il firmware del dispositivo in futuro, potresti dover riconfigurare questa integrazione.",
                 "data": {
                     "type": "Tipo dispositivo"
                 }
             },
             "choose_entities": {
                 "title": "Dettagli dispositivo",
-                "description": "Inserisci il nome del dispositivo",
+                "description": "{device_name}Inserisci il nome del dispositivo",
                 "data": {
                     "name": "Nome dispositivo"
                 }

+ 5 - 5
custom_components/tuya_local/translations/ja.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "デバイスのIPアドレスを特定する",
-                "description": "Tuya クラウドはローカル IP アドレスを提供しないため、ローカル ネットワークを検索してデバイスを見つける必要があります。"
+                "description": "{device_name}Tuya クラウドはローカル IP アドレスを提供しないため、ローカル ネットワークを検索してデバイスを見つける必要があります。"
             },
             "local": {
                 "title": "Tuya Localのデバイスを設定する",
-                "description": "[これらの手順に従ってデバイスIDとローカルキーを見つけてください。]({device_details_url})",
+                "description": "{device_name}[これらの手順に従ってデバイスIDとローカルキーを見つけてください。]({device_details_url})",
                 "data": {
                     "host": "IPアドレスまたはホスト名",
                     "device_id": "デバイスID(デバイスがハブ経由で接続されている場合はハブのdevice_id)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "デバイスの種類を選択してください",
-                "description": "デバイスに合ったタイプを選択してください",
+                "description": "{device_name}デバイスに合ったタイプを選択してください",
                 "data": {
                     "type": "デバイスタイプ"
                 }
             },
             "select_type_auto_detected": {
                 "title": "デバイスの種類を選択してください",
-                "description": "デバイスに合ったタイプを選択してください。プロトコルバージョン{detected_protocol}が自動的に検出され、保存されました。将来デバイスのファームウェアを更新する場合は、この統合を再構成する必要があるかもしれません。",
+                "description": "{device_name}デバイスに合ったタイプを選択してください。プロトコルバージョン{detected_protocol}が自動的に検出され、保存されました。将来デバイスのファームウェアを更新する場合は、この統合を再構成する必要があるかもしれません。",
                 "data": {
                     "type": "デバイスタイプ"
                 }
             },
             "choose_entities": {
                 "title": "デバイスの詳細",
-                "description": "このデバイスの名前を選択してください",
+                "description": "{device_name}このデバイスの名前を選択してください",
                 "data": {
                     "name": "名"
                 }

+ 5 - 5
custom_components/tuya_local/translations/no-NB.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Finn enhetens IP-adresse",
-                "description": "Tuya cloud gir ikke lokale IP-adresser"
+                "description": "{device_name}Tuya cloud gir ikke lokale IP-adresser"
             },
             "local": {
                 "title": "Konfigurer din lokale Tuya enhet",
-                "description": "[Følg instruksjonene her for å finne enhets-id og den lokale nøkkelen.]({device_details_url})",
+                "description": "{device_name}[Følg instruksjonene her for å finne enhets-id og den lokale nøkkelen.]({device_details_url})",
                 "data": {
                     "host": "IP addresse eller vertsnavn",
                     "device_id": "Enhets-ID (device_id, eller device_id for gateway for enheter tilkoblet via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Velg enhetstypen",
-                "description": "Velg enhetstypen som tilsvarer din enhet",
+                "description": "{device_name}Velg enhetstypen som tilsvarer din enhet",
                 "data": {
                     "type": "Enhetstype"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Velg enhetstypen",
-                "description": "Velg typen som samsvarer med enheten din. Protokollversjon {detected_protocol} ble automatisk oppdaget og lagret. Hvis du oppdaterer enhetens firmware i fremtiden, må du kanskje konfigurere denne integrasjonen på nytt.",
+                "description": "{device_name}Velg typen som samsvarer med enheten din. Protokollversjon {detected_protocol} ble automatisk oppdaget og lagret. Hvis du oppdaterer enhetens firmware i fremtiden, må du kanskje konfigurere denne integrasjonen på nytt.",
                 "data": {
                     "type": "Enhetstype"
                 }
             },
             "choose_entities": {
                 "title": "Enhetsdetaljer",
-                "description": "Angi et navn for din enhet",
+                "description": "{device_name}Angi et navn for din enhet",
                 "data": {
                     "name": "Navn"
                 }

+ 5 - 5
custom_components/tuya_local/translations/pl.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Znajdź adres IP urządzenia",
-                "description": "Chmura Tuya nie udostępnia lokalnych adresów IP"
+                "description": "{device_name}Chmura Tuya nie udostępnia lokalnych adresów IP"
             },
             "local": {
                 "title": "Skonfiguruj swoje urządzenie Tuya Local",
-                "description": "[Postępuj zgodnie z instrukcjami by znaleźć swoje Device ID oraz Local key.]({device_details_url})",
+                "description": "{device_name}[Postępuj zgodnie z instrukcjami by znaleźć swoje Device ID oraz Local key.]({device_details_url})",
                 "data": {
                     "host": "Adres IP lub nazwa hosta",
                     "device_id": "Device ID (lub device_id bramki dla urządzeń podłączonych poprzez bramkę)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Wybierz typ urządzenia",
-                "description": "Wybierz typ odpowiadający Twojemu urządzeniu",
+                "description": "{device_name}Wybierz typ odpowiadający Twojemu urządzeniu",
                 "data": {
                     "type": "Typ urządzenia"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Wybierz typ urządzenia",
-                "description": "Wybierz typ odpowiadający Twojemu urządzeniu. Wersja protokołu {detected_protocol} została automatycznie wykryta i zapisana. Jeśli zaktualizujesz oprogramowanie układowe urządzenia w przyszłości, może być konieczne ponowne skonfigurowanie tej integracji.",
+                "description": "{device_name}Wybierz typ odpowiadający Twojemu urządzeniu. Wersja protokołu {detected_protocol} została automatycznie wykryta i zapisana. Jeśli zaktualizujesz oprogramowanie układowe urządzenia w przyszłości, może być konieczne ponowne skonfigurowanie tej integracji.",
                 "data": {
                     "type": "Typ urządzenia"
                 }
             },
             "choose_entities": {
                 "title": "Szczegóły urządzenia",
-                "description": "Wybierz nazwę dla urządzenia",
+                "description": "{device_name}Wybierz nazwę dla urządzenia",
                 "data": {
                     "name": "Nazwa"
                 }

+ 5 - 5
custom_components/tuya_local/translations/pt-BR.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Localize o endereço IP do dispositivo",
-                "description": "A nuvem Tuya não fornece endereços IP locais"
+                "description": "{device_name}A nuvem Tuya não fornece endereços IP locais"
             },
             "local": {
                 "title": "Configure seu dispositivo Tuya Local",
-                "description": "[Siga estas instruções para encontrar o ID do seu dispositivo e a chave local.]({device_details_url})",
+                "description": "{device_name}[Siga estas instruções para encontrar o ID do seu dispositivo e a chave local.]({device_details_url})",
                 "data": {
                     "host": "Endereço IP ou nome do host",
                     "device_id": "Device ID (ou device_id do gateway para dispositivos conectados via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Escolha o tipo de dispositivo",
-                "description": "Escolha o tipo que corresponde ao seu dispositivo",
+                "description": "{device_name}Escolha o tipo que corresponde ao seu dispositivo",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Escolha o tipo de dispositivo",
-                "description": "Escolha o tipo que corresponde ao seu dispositivo. A versão do protocolo {detected_protocol} foi detectada automaticamente e salva. Se você atualizar o firmware do dispositivo no futuro, talvez seja necessário reconfigurar esta integração.",
+                "description": "{device_name}Escolha o tipo que corresponde ao seu dispositivo. A versão do protocolo {detected_protocol} foi detectada automaticamente e salva. Se você atualizar o firmware do dispositivo no futuro, talvez seja necessário reconfigurar esta integração.",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "choose_entities": {
                 "title": "Detalhes do dispositivo",
-                "description": "Escolha um nome para este dispositivo",
+                "description": "{device_name}Escolha um nome para este dispositivo",
                 "data": {
                     "name": "Nome"
                 }

+ 5 - 5
custom_components/tuya_local/translations/pt-PT.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Localize o endereço IP do dispositivo",
-                "description": "O Tuya Cloud não fornece endereços IP locais"
+                "description": "{device_name}O Tuya Cloud não fornece endereços IP locais"
             },
             "local": {
                 "title": "Configure seu dispositivo Tuya Local",
-                "description": "[Siga estas instruções para encontrar o ID do seu dispositivo e a chave local.]({device_details_url})",
+                "description": "{device_name}[Siga estas instruções para encontrar o ID do seu dispositivo e a chave local.]({device_details_url})",
                 "data": {
                     "host": "Endereço IP ou nome do host",
                     "device_id": "Device ID (ou device_id do gateway para dispositivos conectados via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Escolha o tipo de dispositivo",
-                "description": "Escolha o tipo que corresponde ao seu dispositivo",
+                "description": "{device_name}Escolha o tipo que corresponde ao seu dispositivo",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Escolha o tipo de dispositivo",
-                "description": "Escolha o tipo que corresponde ao seu dispositivo. A versão do protocolo {detected_protocol} foi detectada automaticamente e salva. Se você atualizar o firmware do dispositivo no futuro, talvez seja necessário reconfigurar esta integração.",
+                "description": "{device_name}Escolha o tipo que corresponde ao seu dispositivo. A versão do protocolo {detected_protocol} foi detectada automaticamente e salva. Se você atualizar o firmware do dispositivo no futuro, talvez seja necessário reconfigurar esta integração.",
                 "data": {
                     "type": "Tipo de dispositivo"
                 }
             },
             "choose_entities": {
                 "title": "Detalhes do dispositivo",
-                "description": "Escolha um nome para este dispositivo",
+                "description": "{device_name}Escolha um nome para este dispositivo",
                 "data": {
                     "name": "Nome"
                 }

+ 5 - 5
custom_components/tuya_local/translations/ro.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Localizați adresa IP a dispozitivului",
-                "description": "Cloud-ul Tuya nu oferă adrese IP locale, așa că trebuie căutat dispozitivul în rețeaua locală. Aceasta poate dura până la 20 de secunde.\n\nDacă nu reușește, va trebui să furnizați adresa IP prin alte metode, cum ar fi din atribuirea DHCP a routerului.\n\nPentru ca acest pas și următoarea adăugare a dispozitivului să reușească, trebuie să închideți aplicația mobilă, altfel conexiunile acesteia pot bloca comunicarea Tuya Local."
+                "description": "{device_name}Cloud-ul Tuya nu oferă adrese IP locale, așa că trebuie căutat dispozitivul în rețeaua locală. Aceasta poate dura până la 20 de secunde.\n\nDacă nu reușește, va trebui să furnizați adresa IP prin alte metode, cum ar fi din atribuirea DHCP a routerului.\n\nPentru ca acest pas și următoarea adăugare a dispozitivului să reușească, trebuie să închideți aplicația mobilă, altfel conexiunile acesteia pot bloca comunicarea Tuya Local."
             },
             "local": {
                 "title": "Configurează dispozitivul Tuya Local",
-                "description": "[Urmați aceste instrucțiuni pentru a găsi device id și local key.]({device_details_url})",
+                "description": "{device_name}[Urmați aceste instrucțiuni pentru a găsi device id și local key.]({device_details_url})",
                 "data": {
                     "host": "Adresă IP sau hostname",
                     "device_id": "Device ID (sau Device ID al hub-ului pentru dispozitive conectate prin gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Alege tipul dispozitivului",
-                "description": "Alegeți tipul care corespunde dispozitivului dvs.",
+                "description": "{device_name}Alegeți tipul care corespunde dispozitivului dvs.",
                 "data": {
                     "type": "Tip dispozitiv"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Alege tipul dispozitivului",
-                "description": "Alegeți tipul care corespunde dispozitivului dvs. Versiunea protocolului {detected_protocol} a fost detectată și salvată automat. Dacă actualizați firmware-ul dispozitivului în viitor, este posibil să fie necesar să reconfigurați această integrare.",
+                "description": "{device_name}Alegeți tipul care corespunde dispozitivului dvs. Versiunea protocolului {detected_protocol} a fost detectată și salvată automat. Dacă actualizați firmware-ul dispozitivului în viitor, este posibil să fie necesar să reconfigurați această integrare.",
                 "data": {
                     "type": "Tip dispozitiv"
                 }
             },
             "choose_entities": {
                 "title": "Detalii dispozitiv",
-                "description": "Alegeți un nume pentru acest dispozitiv",
+                "description": "{device_name}Alegeți un nume pentru acest dispozitiv",
                 "data": {
                     "name": "Nume"
                 }

+ 5 - 5
custom_components/tuya_local/translations/ru.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Найдите IP-адрес устройства",
-                "description": "Облако Tuya не предоставляет локальные IP-адреса"
+                "description": "{device_name}Облако Tuya не предоставляет локальные IP-адреса"
             },
             "local": {
                 "title": "Настройка устройства Tuya Local",
-                "description": "[Следуйте этим инструкциям, чтобы найти идентификатор устройства и локальный ключ.]({device_details_url})",
+                "description": "{device_name}[Следуйте этим инструкциям, чтобы найти идентификатор устройства и локальный ключ.]({device_details_url})",
                 "data": {
                     "host": "IP-адрес или имя хоста",
                     "device_id": "Идентификатор устройства (device_id, или device_id шлюза для устройств, подключенных через шлюз)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Выберите тип устройства",
-                "description": "Выберите тип, соответствующий вашему устройству",
+                "description": "{device_name}Выберите тип, соответствующий вашему устройству",
                 "data": {
                     "type": "Тип устройства"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Выберите тип устройства",
-                "description": "Выберите тип, соответствующий вашему устройству. Версия протокола {detected_protocol} была автоматически обнаружена и сохранена. Если вы обновите прошивку устройства в будущем, вам может потребоваться повторно настроить эту интеграцию.",
+                "description": "{device_name}Выберите тип, соответствующий вашему устройству. Версия протокола {detected_protocol} была автоматически обнаружена и сохранена. Если вы обновите прошивку устройства в будущем, вам может потребоваться повторно настроить эту интеграцию.",
                 "data": {
                     "type": "Тип устройства"
                 }
             },
             "choose_entities": {
                 "title": "Сведения об устройстве",
-                "description": "Выберите имя для этого устройства",
+                "description": "{device_name}Выберите имя для этого устройства",
                 "data": {
                     "name": "Имя"
                 }

+ 5 - 5
custom_components/tuya_local/translations/sv.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Leta upp enhetens IP-adress",
-                "description": "Tuya cloud tillhandahåller inte lokala IP-adresser så vi måste nu söka i ditt lokala nätverk för att hitta enheten. Detta tar upp till 20 sekunder.\n\nOm det misslyckas måste du själv tillhandahålla IP-adressen på något annat sätt, till exempel från routerns DHCP-tilldelning.\n\nFör att detta steg och den följande enhetsläggningen ska lyckas måste du stänga mobilappen eller dess anslutningar till enheten kommer ofta blockera Tuya Local-kommunikation med dem."
+                "description": "{device_name}Tuya cloud tillhandahåller inte lokala IP-adresser så vi måste nu söka i ditt lokala nätverk för att hitta enheten. Detta tar upp till 20 sekunder.\n\nOm det misslyckas måste du själv tillhandahålla IP-adressen på något annat sätt, till exempel från routerns DHCP-tilldelning.\n\nFör att detta steg och den följande enhetsläggningen ska lyckas måste du stänga mobilappen eller dess anslutningar till enheten kommer ofta blockera Tuya Local-kommunikation med dem."
             },
             "local": {
                 "title": "Konfigurera din Tuya Local-enhet",
-                "description": "[Följ dessa instruktioner för att hitta ditt enhets-ID och lokala nyckel.]({device_details_url})",
+                "description": "{device_name}[Följ dessa instruktioner för att hitta ditt enhets-ID och lokala nyckel.]({device_details_url})",
                 "data": {
                     "host": "IP-adress eller värdnamn",
                     "device_id": "Enhets-ID (eller hubbens enhets-ID för enheter anslutna via gateway)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Välj enhetstyp",
-                "description": "Välj den typ som matchar din enhet",
+                "description": "{device_name}Välj den typ som matchar din enhet",
                 "data": {
                     "type": "Enhetstyp"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Välj enhetstyp",
-                "description": "Välj den typ som matchar din enhet. Protokollversion {detected_protocol} upptäcktes automatiskt och sparades. Om du uppdaterar enhetens firmware i framtiden kan du behöva konfigurera om denna integration.",
+                "description": "{device_name}Välj den typ som matchar din enhet. Protokollversion {detected_protocol} upptäcktes automatiskt och sparades. Om du uppdaterar enhetens firmware i framtiden kan du behöva konfigurera om denna integration.",
                 "data": {
                     "type": "Enhetstyp"
                 }
             },
             "choose_entities": {
                 "title": "Enhetsdetaljer",
-                "description": "Välj ett namn för enheten",
+                "description": "{device_name}Välj ett namn för enheten",
                 "data": {
                     "name": "Namn"
                 }

+ 5 - 5
custom_components/tuya_local/translations/uk.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "Знайдіть IP-адресу пристрою",
-                "description": "Хмара Tuya не надає локальних IP-адрес"
+                "description": "{device_name}Хмара Tuya не надає локальних IP-адрес"
             },
             "local": {
                 "title": "Налаштуйте свій пристрій Tuya Local",
-                "description": "[Дотримуйтеся цих інструкцій, щоб знайти ідентифікатор пристрою та локальний ключ.]({device_details_url})",
+                "description": "{device_name}[Дотримуйтеся цих інструкцій, щоб знайти ідентифікатор пристрою та локальний ключ.]({device_details_url})",
                 "data": {
                     "host": "IP-адреса або ім'я хоста",
                     "device_id": "Ідентифікатор пристрою (device_id, або device_id шлюзу для пристроїв, підключених через шлюз)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "Оберіть тип пристрою",
-                "description": "Виберіть тип, що відповідає вашому пристрою",
+                "description": "{device_name}Виберіть тип, що відповідає вашому пристрою",
                 "data": {
                     "type": "Тип пристрою"
                 }
             },
             "select_type_auto_detected": {
                 "title": "Оберіть тип пристрою",
-                "description": "Выберите тип, который соответствует вашему устройству. Версия протокола {detected_protocol} была автоматически обнаружена и сохранена. Если вы обновите прошивку устройства в будущем, вам может потребоваться повторно настроить эту интеграцию.",
+                "description": "{device_name}Выберите тип, который соответствует вашему устройству. Версия протокола {detected_protocol} была автоматически обнаружена и сохранена. Если вы обновите прошивку устройства в будущем, вам может потребоваться повторно настроить эту интеграцию.",
                 "data": {
                     "type": "Тип пристрою"
                 }
             },
             "choose_entities": {
                 "title": "Налаштування пристрою",
-                "description": "Оберіть назву для цього пристрою",
+                "description": "{device_name}Оберіть назву для цього пристрою",
                 "data": {
                     "name": "Назва"
                 }

+ 5 - 5
custom_components/tuya_local/translations/ur.json

@@ -31,11 +31,11 @@
             },
             "search": {
                 "title": "آلہ کا IP پتہ تلاش کریں۔",
-                "description": "Tuya کلاؤڈ مقامی IP پتے فراہم نہیں کرتا ہے لہذا اب ہمیں آلہ تلاش کرنے کے لیے آپ کے مقامی نیٹ ورک کو تلاش کرنا ہوگا۔ "
+                "description": "{device_name}Tuya کلاؤڈ مقامی IP پتے فراہم نہیں کرتا ہے لہذا اب ہمیں آلہ تلاش کرنے کے لیے آپ کے مقامی نیٹ ورک کو تلاش کرنا ہوگا۔ "
             },
             "local": {
                 "title": "اپنے ٹویا لوکل ڈیوائس کو ترتیب دیں۔",
-                "description": "[اپنی ڈیوائس آئی ڈی اور لوکل کلید تلاش کرنے کے لیے ان ہدایات پر عمل کریں۔]({device_details_url})",
+                "description": "{device_name}[اپنی ڈیوائس آئی ڈی اور لوکل کلید تلاش کرنے کے لیے ان ہدایات پر عمل کریں۔]({device_details_url})",
                 "data": {
                     "host": "IP ایڈریس یا میزبان نام",                    
                     "device_id": "ڈیوائس کی شناخت(یا گیٹ وے کے ذریعے منسلک آلات کے لیے ڈیوائس آئی ڈی)",
@@ -47,21 +47,21 @@
             },
             "select_type": {
                 "title": "آلہ کی قسم کا انتخاب کریں۔",
-                "description": "اس قسم کا انتخاب کریں جو آپ کے آلے سے مماثل ہو۔",
+                "description": "{device_name}اس قسم کا انتخاب کریں جو آپ کے آلے سے مماثل ہو۔",
                 "data": {
                     "type": "آلہ کی قسم"
                 }
             },
             "select_type_auto_detected": {
                 "title": "آلہ کی قسم کا انتخاب کریں۔",
-                "description": "اپنے آلے سے مماثل قسم کا انتخاب کریں۔ پروٹوکول ورژن {detected_protocol} خود بخود پتہ لگایا گیا اور محفوظ کر لیا گیا ہے۔ اگر آپ مستقبل میں آلے کا فرم ویئر اپ ڈیٹ کرتے ہیں، تو آپ کو اس انضمام کو دوبارہ ترتیب دینے کی ضرورت پڑ سکتی ہے۔",
+                "description": "{device_name}اپنے آلے سے مماثل قسم کا انتخاب کریں۔ پروٹوکول ورژن {detected_protocol} خود بخود پتہ لگایا گیا اور محفوظ کر لیا گیا ہے۔ اگر آپ مستقبل میں آلے کا فرم ویئر اپ ڈیٹ کرتے ہیں، تو آپ کو اس انضمام کو دوبارہ ترتیب دینے کی ضرورت پڑ سکتی ہے۔",
                 "data": {
                     "type": "آلہ کی قسم"
                 }
             },
             "choose_entities": {
                 "title": "آلہ کی تفصیلات",
-                "description": "اس آلہ کے لیے ایک نام منتخب کریں",
+                "description": "{device_name}اس آلہ کے لیے ایک نام منتخب کریں",
                 "data": {
                     "name": "نام ۔"
                 }

+ 5 - 5
custom_components/tuya_local/translations/zh-Hans.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "定位设备IP地址",
-                "description": "Tuya云不提供本地IP地址,因此我们现在必须搜索您的本地网络以找到设备。这需要最多20秒。\n\n如果搜索不成功,您需要通过其他方式提供IP地址,例如从路由器的DHCP分配中获取。\n\n为了使这一步骤和后续的设备添加成功,您必须关闭移动应用,否则其连接会阻止Tuya Local与设备的通信。"
+                "description": "{device_name}Tuya云不提供本地IP地址,因此我们现在必须搜索您的本地网络以找到设备。这需要最多20秒。\n\n如果搜索不成功,您需要通过其他方式提供IP地址,例如从路由器的DHCP分配中获取。\n\n为了使这一步骤和后续的设备添加成功,您必须关闭移动应用,否则其连接会阻止Tuya Local与设备的通信。"
             },
             "local": {
                 "title": "配置您的Tuya Local设备",
-                "description": "[按照这些说明找到您的设备ID和 Local key]({device_details_url})",
+                "description": "{device_name}[按照这些说明找到您的设备ID和 Local key]({device_details_url})",
                 "data": {
                     "host": "IP地址或主机名",
                     "device_id": "设备ID (或者通过网关连接的设备的设备ID)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "选择设备类型",
-                "description": "选择与您的设备匹配的类型",
+                "description": "{device_name}选择与您的设备匹配的类型",
                 "data": {
                     "type": "设备类型"
                 }
             },
             "select_type_auto_detected": {
                 "title": "选择设备类型",
-                "description": "选择与您的设备匹配的类型。协议版本{detected_protocol}已自动检测并保存。如果您将来更新设备固件,可能需要重新配置此集成。",
+                "description": "{device_name}选择与您的设备匹配的类型。协议版本{detected_protocol}已自动检测并保存。如果您将来更新设备固件,可能需要重新配置此集成。",
                 "data": {
                     "type": "设备类型"
                 }
             },
             "choose_entities": {
                 "title": "设备详情",
-                "description": "为此设备选择一个名称",
+                "description": "{device_name}为此设备选择一个名称",
                 "data": {
                     "name": "名称"
                 }

+ 5 - 5
custom_components/tuya_local/translations/zh-Hant.json

@@ -30,11 +30,11 @@
             },
             "search": {
                 "title": "定位設備IP位址",
-                "description": "Tuya雲端不提供本地IP位址,因此我們現在必須搜尋您的本地網路以找到裝置。這需要最多20秒。 \n\n如果搜尋不成功,您需要透過其他方式提供IP位址,例如從路由器的DHCP分配中取得。 \n\n為了使此步驟和後續的裝置新增成功,您必須關閉行動應用,否則其連線會阻止Tuya Local與裝置的通訊。"
+                "description": "{device_name}Tuya雲端不提供本地IP位址,因此我們現在必須搜尋您的本地網路以找到裝置。這需要最多20秒。 \n\n如果搜尋不成功,您需要透過其他方式提供IP位址,例如從路由器的DHCP分配中取得。 \n\n為了使此步驟和後續的裝置新增成功,您必須關閉行動應用,否則其連線會阻止Tuya Local與裝置的通訊。"
             },
             "local": {
                 "title": "配置您的Tuya Local設備",
-                "description": "[請按照這些說明找到您的裝置ID和 Local key]({devide_details_url})",
+                "description": "{device_name}[請按照這些說明找到您的裝置ID和 Local key]({devide_details_url})",
                 "data": {
                     "host": "IP位址或主機名",
                     "device_id": "設備ID(或device_id網關,對於透過網關連接的設備)",
@@ -46,21 +46,21 @@
             },
             "select_type": {
                 "title": "選擇設備類型",
-                "description": "選擇與您的裝置相符的類型",
+                "description": "{device_name}選擇與您的裝置相符的類型",
                 "data": {
                     "type": "設備類型"
                 }
             },
             "select_type_auto_detected": {
                 "title": "選擇設備類型",
-                "description": "選擇與您的裝置相符的類型。協議版本{detected_protocol}已自動檢測並保存。如果您將來更新設備固件,可能需要重新配置此集成。",
+                "description": "{device_name}選擇與您的裝置相符的類型。協議版本{detected_protocol}已自動檢測並保存。如果您將來更新設備固件,可能需要重新配置此集成。",
                 "data": {
                     "type": "設備類型"
                 }
             },
             "choose_entities": {
                 "title": "設備詳情",
-                "description": "為此設備選擇一個名稱",
+                "description": "{device_name}為此設備選擇一個名稱",
                 "data": {
                     "name": "名稱"
                 }

+ 2 - 2
tests/test_config_flow.py

@@ -440,7 +440,7 @@ async def test_flow_select_type_init(hass, mocker):
     )
     expected = {
         "data_schema": mocker.ANY,
-        "description_placeholders": None,
+        "description_placeholders": {"device_name": ""},
         "errors": None,
         "flow_id": mocker.ANY,
         "handler": DOMAIN,
@@ -506,7 +506,7 @@ async def test_flow_choose_entities_init(hass, mocker):
 
     expected = {
         "data_schema": mocker.ANY,
-        "description_placeholders": None,
+        "description_placeholders": {"device_name": ""},
         "errors": None,
         "flow_id": mocker.ANY,
         "handler": DOMAIN,