fix state and state_not

This commit is contained in:
Johannes
2022-12-20 21:35:33 +01:00
committed by GitHub
parent 979fe3d63b
commit 47658a8d84

View File

@@ -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