From d5f318b670fff62425cf618f1c8167fe0e44f849 Mon Sep 17 00:00:00 2001 From: rfdarter Date: Mon, 23 Dec 2024 13:28:59 +0100 Subject: [PATCH 1/2] show --- packages/v3/src/esp-entity-table.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/v3/src/esp-entity-table.ts b/packages/v3/src/esp-entity-table.ts index 3195a20..c963a9f 100644 --- a/packages/v3/src/esp-entity-table.ts +++ b/packages/v3/src/esp-entity-table.ts @@ -607,16 +607,16 @@ class ActionRenderer { render_lock() { if (!this.entity) return; - return html`${this._actionButton(this.entity, "🔐", "lock")} - ${this._actionButton(this.entity, "🔓", "unlock")} + return html`${this._actionButton(this.entity, "🔐", "lock", this.entity.state === "LOCKED")} + ${this._actionButton(this.entity, "🔓", "unlock", this.entity.state === "UNLOCKED")} ${this._actionButton(this.entity, "↑", "open")} `; } render_cover() { if (!this.entity) return; - return html`${this._actionButton(this.entity, "↑", "open")} - ${this._actionButton(this.entity, "☐", "stop")} - ${this._actionButton(this.entity, "↓", "close")}`; + return html`${this._actionButton(this.entity, "↑", "open", this.entity.state === "OPEN")} + ${this._actionButton(this.entity, "☐", "stop", )} + ${this._actionButton(this.entity, "↓", "close", this.entity.state === "CLOSED")}`; } render_button() { From 474516c05fea106b79cf0c76226ab72e7a251cdc Mon Sep 17 00:00:00 2001 From: RFDarter Date: Fri, 14 Feb 2025 08:21:14 +0100 Subject: [PATCH 2/2] Update packages/v3/src/esp-entity-table.ts Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- packages/v3/src/esp-entity-table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/src/esp-entity-table.ts b/packages/v3/src/esp-entity-table.ts index c20c665..62aaae6 100644 --- a/packages/v3/src/esp-entity-table.ts +++ b/packages/v3/src/esp-entity-table.ts @@ -665,7 +665,7 @@ class ActionRenderer { render_cover() { if (!this.entity) return; return html`${this._actionButton(this.entity, "↑", "open", this.entity.state === "OPEN")} - ${this._actionButton(this.entity, "☐", "stop", )} + ${this._actionButton(this.entity, "☐", "stop")} ${this._actionButton(this.entity, "↓", "close", this.entity.state === "CLOSED")}`; }