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() {