From e09dbd5db366d363bf5b3e5d4eb1018b829e12da Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 5 Mar 2024 15:25:39 +0100 Subject: [PATCH] Add grid support to lock card --- src/cards/lock-card/lock-card.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/cards/lock-card/lock-card.ts b/src/cards/lock-card/lock-card.ts index fc1d9ade..18c3d65a 100644 --- a/src/cards/lock-card/lock-card.ts +++ b/src/cards/lock-card/lock-card.ts @@ -37,7 +37,7 @@ registerCustomCard({ }); @customElement(LOCK_CARD_NAME) -export class LockCard extends MushroomBaseCard implements LovelaceCard { +export class LockCard extends MushroomBaseCard implements LovelaceCard { public static async getConfigElement(): Promise { await import("./lock-card-editor"); return document.createElement(LOCK_CARD_EDITOR_NAME) as LovelaceCardEditor; @@ -52,22 +52,8 @@ export class LockCard extends MushroomBaseCard implements LovelaceCard { }; } - @state() private _config?: LockCardConfig; - - getCardSize(): number | Promise { - return 1; - } - - setConfig(config: LockCardConfig): void { - this._config = { - tap_action: { - action: "more-info", - }, - hold_action: { - action: "more-info", - }, - ...config, - }; + protected get hasControls(): boolean { + return true; } private _handleAction(ev: ActionHandlerEvent) {