Skip to content

Commit

Permalink
Use username in example on empty automation page (#19189)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Dec 29, 2023
1 parent cb568d0 commit c95a30c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/media-player/ha-browse-media-tts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BrowseMediaTTS extends LitElement {
this.hass.localize(
"ui.components.media-browser.tts.example_message",
{
name: this.hass.user?.name || "",
name: this.hass.user?.name || "Alice",
}
)}
>
Expand Down
3 changes: 2 additions & 1 deletion src/panels/config/automation/ha-automation-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ class HaAutomationPicker extends LitElement {
</p>
<p>
${this.hass.localize(
"ui.panel.config.automation.picker.empty_text_2"
"ui.panel.config.automation.picker.empty_text_2",
{ user: this.hass.user?.name || "Alice" }
)}
</p>
<a
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/automation/manual-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class HaManualAutomationEditor extends LitElement {
? html`<p>
${this.hass.localize(
"ui.panel.config.automation.editor.conditions.description",
{ user: this.hass.user?.name }
{ user: this.hass.user?.name || "Alice" }
)}
</p>`
: nothing}
Expand Down
2 changes: 1 addition & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2386,7 +2386,7 @@
},
"empty_header": "Start automating",
"empty_text_1": "Automations make Home Assistant automatically respond to things happening in and around your home.",
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if Alice is home, then turn on the lights''."
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if {user} is home, then turn on the lights''."
},
"dialog_new": {
"header": "Create automation",
Expand Down

0 comments on commit c95a30c

Please sign in to comment.