mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Fix entity renaming when adding a new device (#26177)
This commit is contained in:
parent
1e06046bd6
commit
361474885f
@ -212,7 +212,10 @@ class StepFlowCreateEntry extends LitElement {
|
|||||||
entityIds.push(...entities.map((entity) => entity.entity_id));
|
entityIds.push(...entities.map((entity) => entity.entity_id));
|
||||||
});
|
});
|
||||||
|
|
||||||
const entityIdsMapping = getAutomaticEntityIds(this.hass, entityIds);
|
const entityIdsMapping = await getAutomaticEntityIds(
|
||||||
|
this.hass,
|
||||||
|
entityIds
|
||||||
|
);
|
||||||
|
|
||||||
Object.entries(entityIdsMapping).forEach(([oldEntityId, newEntityId]) => {
|
Object.entries(entityIdsMapping).forEach(([oldEntityId, newEntityId]) => {
|
||||||
if (newEntityId) {
|
if (newEntityId) {
|
||||||
|
@ -134,7 +134,7 @@ class ZHADeviceCard extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
const entities = this._deviceEntities(device.device_reg_id, this._entities);
|
const entities = this._deviceEntities(device.device_reg_id, this._entities);
|
||||||
|
|
||||||
const entityIdsMapping = getAutomaticEntityIds(
|
const entityIdsMapping = await getAutomaticEntityIds(
|
||||||
this.hass,
|
this.hass,
|
||||||
entities.map((entity) => entity.entity_id)
|
entities.map((entity) => entity.entity_id)
|
||||||
);
|
);
|
||||||
|
@ -878,7 +878,7 @@ class DialogZWaveJSAddNode extends SubscribeMixin(LitElement) {
|
|||||||
(entity) => entity.device_id === this._device!.id
|
(entity) => entity.device_id === this._device!.id
|
||||||
);
|
);
|
||||||
|
|
||||||
const entityIdsMapping = getAutomaticEntityIds(
|
const entityIdsMapping = await getAutomaticEntityIds(
|
||||||
this.hass,
|
this.hass,
|
||||||
entities.map((entity) => entity.entity_id)
|
entities.map((entity) => entity.entity_id)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user