diff --git a/src/components/ha-areas-picker.ts b/src/components/ha-areas-picker.ts index 088a9dcde3..9f3dfd0d51 100644 --- a/src/components/ha-areas-picker.ts +++ b/src/components/ha-areas-picker.ts @@ -1,3 +1,4 @@ +import { mdiDragHorizontalVariant } from "@mdi/js"; import type { HassEntity } from "home-assistant-js-websocket"; import { css, html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators"; @@ -6,6 +7,7 @@ import { SubscribeMixin } from "../mixins/subscribe-mixin"; import type { HomeAssistant } from "../types"; import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker"; import "./ha-area-picker"; +import "./ha-sortable"; @customElement("ha-areas-picker") export class HaAreasPicker extends SubscribeMixin(LitElement) { @@ -62,6 +64,8 @@ export class HaAreasPicker extends SubscribeMixin(LitElement) { @property({ type: Boolean }) public required = false; + @property({ type: Boolean }) public reorder = false; + protected render() { if (!this.hass) { return nothing; @@ -69,26 +73,42 @@ export class HaAreasPicker extends SubscribeMixin(LitElement) { const currentAreas = this._currentAreas; return html` - ${currentAreas.map( - (area) => html` -