mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Clarify renaming entity ids (#6668)
This commit is contained in:
parent
7d05855ee0
commit
22210b7400
@ -44,6 +44,7 @@ import "./device-detail/ha-device-entities-card";
|
|||||||
import "./device-detail/ha-device-info-card";
|
import "./device-detail/ha-device-info-card";
|
||||||
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
|
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
|
||||||
import { slugify } from "../../../common/string/slugify";
|
import { slugify } from "../../../common/string/slugify";
|
||||||
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
|
|
||||||
export interface EntityRegistryStateEntry extends EntityRegistryEntry {
|
export interface EntityRegistryStateEntry extends EntityRegistryEntry {
|
||||||
stateName?: string | null;
|
stateName?: string | null;
|
||||||
@ -549,11 +550,14 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
|
|
||||||
const renameEntityid =
|
const renameEntityid =
|
||||||
this.showAdvanced &&
|
this.showAdvanced &&
|
||||||
confirm(
|
(await showConfirmationDialog(this, {
|
||||||
this.hass.localize(
|
title: this.hass.localize(
|
||||||
"ui.panel.config.devices.confirm_rename_entity_ids"
|
"ui.panel.config.devices.confirm_rename_entity_ids"
|
||||||
)
|
),
|
||||||
);
|
text: this.hass.localize(
|
||||||
|
"ui.panel.config.devices.confirm_rename_entity_ids_warning"
|
||||||
|
),
|
||||||
|
}));
|
||||||
|
|
||||||
const updateProms = entities.map((entity) => {
|
const updateProms = entities.map((entity) => {
|
||||||
const name = entity.name || entity.stateName;
|
const name = entity.name || entity.stateName;
|
||||||
|
@ -1421,6 +1421,7 @@
|
|||||||
"scripts": "Scripts",
|
"scripts": "Scripts",
|
||||||
"scenes": "Scenes",
|
"scenes": "Scenes",
|
||||||
"confirm_rename_entity_ids": "Do you also want to rename the entity id's of your entities?",
|
"confirm_rename_entity_ids": "Do you also want to rename the entity id's of your entities?",
|
||||||
|
"confirm_rename_entity_ids_warning": "This will not change any configuration (like automations, scripts, scenes, Lovelace) that is currently using these entities, you will have to update them yourself.",
|
||||||
"data_table": {
|
"data_table": {
|
||||||
"device": "Device",
|
"device": "Device",
|
||||||
"manufacturer": "Manufacturer",
|
"manufacturer": "Manufacturer",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user