Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openhab): fix syntax error in event value_template #25140

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Dec 9, 2024

Jinjava (the Jinja implementation openHAB uses) has an issue with using is defined on a filter (see
HubSpot/jinjava#1226). Using parentheses works around the issue, and is still compatible with Home Assistant's reference Python implementation.

Note that I plan on getting this fixed in Jinjava (I recently got continue support added (HubSpot/jinjava#1219) specifically to support this same value_template), but it might take a bit since I'm still fairly unfamiliar with Jinjava's internals, and they can take a while before they release a new version, so this workaround in Z2M is a much faster path to getting it working. Once Jinjava has been fixed and openHAB has a release with that fix, this workaround can be reverted.

@ccutrer ccutrer force-pushed the event-is_defined-workaround branch from d233ad7 to bc9b654 Compare December 9, 2024 17:58
@ccutrer ccutrer changed the base branch from master to dev December 9, 2024 17:59
Jinjava (the Jinja implementation openHAB uses) has an issue with
using `is defined` on a filter (see
HubSpot/jinjava#1226). Using parentheses
works around the issue, and is still compatible with Home Assistant's
reference Python implementation.
@ccutrer ccutrer force-pushed the event-is_defined-workaround branch from bc9b654 to b41a5e3 Compare December 9, 2024 18:04
@Koenkk Koenkk merged commit 226945c into Koenkk:dev Dec 9, 2024
11 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 9, 2024

Thanks!

@ccutrer ccutrer deleted the event-is_defined-workaround branch December 9, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants