Clarify renaming entity ids (#6668)

This commit is contained in:
Bram Kragten 2020-08-21 16:25:33 +02:00 committed by GitHub
parent 7d05855ee0
commit 22210b7400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -44,6 +44,7 @@ import "./device-detail/ha-device-entities-card";
import "./device-detail/ha-device-info-card";
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
import { slugify } from "../../../common/string/slugify";
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
export interface EntityRegistryStateEntry extends EntityRegistryEntry {
stateName?: string | null;
@ -549,11 +550,14 @@ export class HaConfigDevicePage extends LitElement {
const renameEntityid =
this.showAdvanced &&
confirm(
this.hass.localize(
(await showConfirmationDialog(this, {
title: this.hass.localize(
"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 name = entity.name || entity.stateName;

View File

@ -1421,6 +1421,7 @@
"scripts": "Scripts",
"scenes": "Scenes",
"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": {
"device": "Device",
"manufacturer": "Manufacturer",