From 5a5005c09cf16321222d5a3342d7a4ece11d05bc Mon Sep 17 00:00:00 2001 From: Wendelin <12148533+wendevlin@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:15:03 +0200 Subject: [PATCH] Fix matter commissioning wording and add prevent misuse alert (#22083) * Fix matter commissioning wording and add prevent misuse alert * Update src/translations/en.json Co-authored-by: Bram Kragten * Add small misuese prevent note for matter-commissioning dialog --------- Co-authored-by: Paul Bottein Co-authored-by: Bram Kragten --- ...dialog-matter-open-commissioning-window.ts | 19 ++++++++++++++++++- src/translations/en.json | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/matter/dialog-matter-open-commissioning-window.ts b/src/panels/config/integrations/integration-panels/matter/dialog-matter-open-commissioning-window.ts index ec3d5ff3a073..a346f4a3c6fb 100644 --- a/src/panels/config/integrations/integration-panels/matter/dialog-matter-open-commissioning-window.ts +++ b/src/panels/config/integrations/integration-panels/matter/dialog-matter-open-commissioning-window.ts @@ -137,7 +137,19 @@ class DialogMatterOpenCommissioningWindow extends LitElement { : html`

${this.hass.localize( - "ui.panel.config.matter.open_commissioning_window.introduction" + "ui.panel.config.matter.open_commissioning_window.description", + { + startCommissioning: html`${this.hass.localize( + "ui.panel.config.matter.open_commissioning_window.start_commissioning" + )}`, + } + )} +

+

+ ${this.hass.localize( + "ui.panel.config.matter.open_commissioning_window.prevent_misuse_description" )}

@@ -247,6 +259,11 @@ class DialogMatterOpenCommissioningWindow extends LitElement { .code { font-family: monospace; } + + .note { + color: var(--secondary-text-color); + font-size: 0.9em; + } `, ]; } diff --git a/src/translations/en.json b/src/translations/en.json index c6002da58bb3..c547b9fe5bed 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5131,7 +5131,8 @@ }, "open_commissioning_window": { "title": "Share device", - "introduction": "Enable commissioning mode on the device to pair it to another Matter controller.", + "description": "To continue, select {startCommissioning}. Home Assistant will then put your device in commissioning mode, allowing it to pair with another Matter controller.", + "prevent_misuse_description": "Note: Do not press the physical setup button on the device as this will reset it.", "start_commissioning": "Share device", "in_progress": "We're communicating with the device. This may take some time.", "failed": "The command failed. Additional information may be available in the logs.",