Skip to content

Commit

Permalink
Move out of if
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede committed Dec 11, 2024
1 parent a55dba2 commit 1a28eac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/panels/config/automation/ha-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,15 +861,15 @@ export class HaAutomationEditor extends PreventUnsavedMixin(
(entity: EntityRegistryEntry) => entity.unique_id === id
);
entityId = automation?.entity_id;
}

if (entityId) {
await updateEntityRegistryEntry(this.hass, entityId, {
categories: {
automation: this._entityRegistryUpdate.category || "",
},
labels: this._entityRegistryUpdate.labels || [],
});
}
if (entityId) {
await updateEntityRegistryEntry(this.hass, entityId, {
categories: {
automation: this._entityRegistryUpdate.category || "",
},
labels: this._entityRegistryUpdate.labels || [],
});
}
}

Expand Down

0 comments on commit 1a28eac

Please sign in to comment.