Error in openHAB 4 from Jinja transform in rtl_433_mqtt_hass.py with "value_template": "{{ float(value) * 99 + 1 }}" #2776
Unanswered
riegelbrau
asked this question in
Q&A
Replies: 1 comment 1 reply
-
And there are also things like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using rtl_433_mqtt_hass.py with openHAB 4.04 to auto-create Things from rtl_433. Since some time (don't know exactly when) the Jinja transform throws an error from the battery_ok mapping. The entry "value_template": "{{ float(value) * 99 + 1 }}," leads to
Could not resolve function 'float'
Log excerpt:
2024-01-02 13:27:33.347 [DEBUG] [.internal.JinjaTransformationService] - about to transform '1' by the function '{{ float(value) * 99 + 1 }}'
2024-01-02 13:27:33.527 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JINJA-transformation failed: An error occurred while transformation. Could not resolve function 'float'
After some tracing I changed the line to
"value_template": "{{ value|float * 99 + 1 }}",
and it works without any error.My questions:
Thanks a lot.
Christoph
Beta Was this translation helpful? Give feedback.
All reactions