Fix entity renaming when adding a new device (#26177)

This commit is contained in:
Petar Petrov 2025-07-16 11:00:49 +03:00 committed by Bram Kragten
parent 1e06046bd6
commit 361474885f
3 changed files with 6 additions and 3 deletions

View File

@ -212,7 +212,10 @@ class StepFlowCreateEntry extends LitElement {
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]) => {
if (newEntityId) {

View File

@ -134,7 +134,7 @@ class ZHADeviceCard extends SubscribeMixin(LitElement) {
}
const entities = this._deviceEntities(device.device_reg_id, this._entities);
const entityIdsMapping = getAutomaticEntityIds(
const entityIdsMapping = await getAutomaticEntityIds(
this.hass,
entities.map((entity) => entity.entity_id)
);

View File

@ -878,7 +878,7 @@ class DialogZWaveJSAddNode extends SubscribeMixin(LitElement) {
(entity) => entity.device_id === this._device!.id
);
const entityIdsMapping = getAutomaticEntityIds(
const entityIdsMapping = await getAutomaticEntityIds(
this.hass,
entities.map((entity) => entity.entity_id)
);