Remove unassigned from order configuration in areas strategy

This commit is contained in:
Paul Bottein 2025-07-09 17:26:41 +02:00
parent e7e062a222
commit 7f1db9a151
No known key found for this signature in database

View File

@ -183,7 +183,9 @@ export class HaAreasFloorsDisplayEditor extends LitElement {
const floorIds = this._sortedFloors(
this.hass.floors,
this.value?.floors_display?.order
).map((floor) => floor.floor_id);
)
.map((floor) => floor.floor_id)
.filter((floorId) => floorId !== UNASSIGNED_FLOOR);
const newOrder = [...floorIds];
const movedFloorId = newOrder.splice(oldIndex, 1)[0];
newOrder.splice(newIndex, 0, movedFloorId);