Fix disabled condition within an automation action (#87213)

fixes undefined
This commit is contained in:
Karlie Meads 2023-02-02 16:35:02 -05:00 committed by GitHub
parent 11cb6b131f
commit e40a9822f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 1 deletions

View file

@ -757,7 +757,7 @@ class _ScriptRun:
with trace_path(condition_path):
for idx, cond in enumerate(conditions):
with trace_path(str(idx)):
if not cond(hass, variables):
if cond(hass, variables) is False:
return False
except exceptions.ConditionError as ex:
_LOGGER.warning("Error in '%s[%s]' evaluation: %s", name, idx, ex)