openhab-addons/bundles/org.openhab.transform.jinja
Wouter Born 051c764789
Upgrade Jackson to 2.12.2 (#10288)
* Adds a jackson.version property to simplify managing the version
* Make sure the specified version is used as add-on dependency by excluding Jackson from transitive dependencies
* Use openhab.tp-jackson feature with dynamodb
* Remove jackson-dataformat-cbor dependency from features which is now also provided by the openhab.tp-jackson feature

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-07 10:19:32 +01:00
..
src Update license headers to 2021 (#9620) 2021-01-02 22:03:14 +01:00
noEmbedDependencies.profile added migrated 2.x add-ons 2020-09-21 03:37:19 +02:00
NOTICE added migrated 2.x add-ons 2020-09-21 03:37:19 +02:00
pom.xml Upgrade Jackson to 2.12.2 (#10288) 2021-03-07 10:19:32 +01:00
README.md added migrated 2.x add-ons 2020-09-21 03:37:19 +02:00

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