From 7d203c53254e1506b311a48d77d83e700fb95f2d Mon Sep 17 00:00:00 2001 From: Adrien Brault Date: Sun, 22 Oct 2023 15:10:31 +0200 Subject: [PATCH] fix: use lock entity rather than binary_sensor --- src/cards/AreaCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cards/AreaCard.js b/src/cards/AreaCard.js index f0af6c1..51dda30 100644 --- a/src/cards/AreaCard.js +++ b/src/cards/AreaCard.js @@ -84,8 +84,8 @@ class AreaCard extends AbstractCard { } if (!card.badge_icon) { + const lock = this.options?.lock || Helper.getStateEntities(this.entity, "lock")[0]?.entity_id; const window = this.options?.window || Helper.getStateEntities(this.entity, "binary_sensor", "window")[0]?.entity_id; - const lock = this.options?.lock || Helper.getStateEntities(this.entity, "binary_sensor", "lock")[0]?.entity_id; const door = this.options?.door || Helper.getStateEntities(this.entity, "binary_sensor", "door")[0]?.entity_id; let badgeConditions = []