Help: JSON to Temperature and Humidity Items

Hello,
Does anyone know how to extract the temperature and humidity values into their respective items in OpenHAB2 from an MQTT message?

The output from the device is as follows:

{“Time”:“2017-02-10T19:34:28”, “DHT”:{“Temperature”:“18.50”, “Humidity”:“61.10”}}

Use the JSONPATH transform.

:JSONPATH($.DHT.Temperature)
:JSONPATH($.DHT.Humidity)

Thanks @PointandClick

How would that actually work in the home.items file?
I currently have the following

Number RoomTemp “Temperature [%.1f °C]” (Temperature)
{mqtt="<[mqttbroker:home/roomone/DHT:state:default]"}

Will it be like this
{mqtt="<[mqttbroker:home/roomone/DHT:state:JSONPATH($.DHT.Temperature)]"}

That should be right.

Thanks. Worked perfectly :slight_smile: