mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
cc042dabff
The handleUpdate method was deprecated when profiles were introduced (see eclipse-archived/smarthome#4108). Instead the "follow profile" can be used which forwards item updates as commands to handlers. This profile works with any binding instead of only those that implement the handleUpdate method. Related to openhab/openhab-core#1669 Signed-off-by: Wouter Born <github@maindrain.net> |
||
---|---|---|
.. | ||
src | ||
noEmbedDependencies.profile | ||
NOTICE | ||
pom.xml | ||
README.md |
Jinja Transformation Service
Transforms a value using a jinja template.
The main purpose of this transformer is the use in the home assistant discovery. Therfore not all features of the home assistant templating are supported. Basically on Processing incoming data
Available variables
Variable | Description |
---|---|
value | The incoming value. |
value_json | The incoming value parsed as JSON. |
Examples
Basic Example
Given the value
{"Time":"2019-01-05T22:45:12","AM2301":{"Temperature":4.7,"Humidity":93.7},"TempUnit":"C"}
the template
::: v-pre
{{value_json['AM2301'].Temperature}}
:::
extracts the string 4.7
.
Further Reading
- Wikipedia on [Jinja](https://en.wikipedia.org/wiki/Jinja_(template_engine).
- Home assistant discovery.
- Home assistant templating.