From 47658a8d84ac64f4c54505302564befff2ec4cf4 Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 20 Dec 2022 21:35:33 +0100 Subject: [PATCH] fix state and state_not --- apps/nspanel-lovelace-ui/luibackend/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 1b8c1780..6ab21b76 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -256,9 +256,9 @@ class LuiPagesGen(object): # HA Entities entity = apis.ha_api.get_entity(entityId) # check state for if a condition is defined - if item.condState is not None and item.condState == entity.state: + if item.condState is not None and item.condState != entity.state: return "" - if item.condStateNot is not None and item.condState != entity.state: + if item.condStateNot is not None and item.condStateNot == entity.state: return "" # common res vars