Skip to content

Commit

Permalink
Fix area in device picker
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon committed Dec 7, 2023
1 parent cca1183 commit 144bffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/device/ha-device-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export class HaDevicePicker extends LitElement {
deviceEntityLookup = getDeviceEntityDisplayLookup(entities);
}

const areaLookup = areas;
const areaLookup: { [areaId: string]: AreaRegistryEntry } = {};
for (const area of areas) {
areaLookup[area.area_id] = area;
}

let inputDevices = devices.filter(
(device) => device.id === this.value || !device.disabled_by
Expand Down

0 comments on commit 144bffb

Please sign in to comment.