Compare commits

...
Author SHA1 Message Date
Paul Bottein aba8ff5c3d Rename "Use device name" to "Main entity of the device" 2026-10-26 18:29:23 +01:00
2 changed files with 33 additions and 19 deletions

No files matched your search

@@ -481,27 +481,39 @@ export class EntityRegistrySettingsEditor extends LitElement {
return html`
${
!this.hideName && this._device
? html`<ha-row-item>
? html`<ha-row-item class="main-entity">
<span slot="headline"
>${this.hass.localize(
"ui.dialogs.entity_registry.editor.use_device_name"
)}
(${computeDeviceNameDisplay(this._device, this.hass.localize)})</span
"ui.dialogs.entity_registry.editor.main_entity",
{
device: computeDeviceNameDisplay(
this._device,
this.hass.localize
),
}
)}</span
>
<span slot="supporting-text"
>${this.hass.localize(
"ui.dialogs.entity_registry.editor.change_device_settings",
{
link: html`<button
class="link"
@click=${this._openDeviceSettings}
>
${this.hass.localize(
"ui.dialogs.entity_registry.editor.change_device_name_link"
)}
</button>`,
}
)}</span
"ui.dialogs.entity_registry.editor.main_entity_description"
)}
${
this._useDeviceName
? this.hass.localize(
"ui.dialogs.entity_registry.editor.change_device_settings",
{
link: html`<button
class="link"
@click=${this._openDeviceSettings}
>
${this.hass.localize(
"ui.dialogs.entity_registry.editor.change_device_name_link"
)}
</button>`,
}
)
: nothing
}</span
>
<ha-switch
slot="end"
@@ -1912,6 +1924,7 @@ export class EntityRegistrySettingsEditor extends LitElement {
margin-inline-start: 0;
}
ha-row-item.main-entity::part(supporting-text),
ha-row-item.device-area::part(supporting-text) {
white-space: normal;
}
+4 -3
View File
@@ -2151,7 +2151,8 @@
"faq": "documentation",
"editor": {
"name": "Name",
"use_device_name": "Use device name",
"main_entity": "Main entity of the device ({device})",
"main_entity_description": "Main entities are shown with the device name only.",
"change_device_name_link": "change the device name",
"restore_name": "Restore default name",
"icon": "Icon",
@@ -2262,8 +2263,8 @@
"note": "Note: This might not work yet with all integrations.",
"use_device_area": "Use device area",
"use_device_area_confirm_title": "Use the area of the device?",
"use_device_area_confirm_text": "This entity is in {area}. Because it has no name of its own, it will use the area of its device instead.",
"use_device_area_required": "An entity without its own name always uses the area of its device. You can {link} in the device settings.",
"use_device_area_confirm_text": "This entity is in {area}. As a main entity, it will use the area of its device instead.",
"use_device_area_required": "A main entity always uses the area of its device. You can {link} in the device settings.",
"change_device_settings": "You can {link} in the device settings",
"change_device_area_link": "change the device area",
"configure_state": "{integration} options",