From 8d2ec8098c34a10bc7dbd708a2a1d484623a77a0 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 25 Oct 2023 13:09:28 +0200 Subject: [PATCH] Fix state not condition for condition card (#18397) --- src/panels/lovelace/common/validate-condition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/common/validate-condition.ts b/src/panels/lovelace/common/validate-condition.ts index 57c2eab65eb2..b6059292dbaa 100644 --- a/src/panels/lovelace/common/validate-condition.ts +++ b/src/panels/lovelace/common/validate-condition.ts @@ -49,7 +49,7 @@ function checkStateCondition( return condition.state != null ? ensureArray(condition.state).includes(state) - : ensureArray(condition.state_not).includes(state); + : !ensureArray(condition.state_not).includes(state); } function checkStateNumericCondition(