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(