- Hardware: RASPI4B/4GB
- OS: Raspberry OS
- Java Runtime Environment: Zulu11
- openHAB version: 3.0.1
Issue of the topic:
I am just on my first stepts getting openhab3 running and doing something. What I got so far: I installed Mosquito to use it as an MQTT broker. I added it as thing. I configured my sensor (a sonoff TH16 running tasmota) to connect to the MQTT broker. I added it as “Generic MQTT Thing” with 2 channels (one for the switch (Switch) and one for the sensor data(String)). I created 2 items to be linked to the channels. The switching item is working like expected. It updates the status if switch is operated at the device and it is switching the device if operated in openhab. As the string item for the temperature is showing the full json object I already found out that I need to install the transformation addon JSONPath. So have done this and tried to convert this object:
So I did it within the “Channel Link” by selecting the profile JSONPATH and added $.DS18B20.Temperature in the expression. It worked so far and I got the result 22.6 but now I want to add the unit “°C” and dont know how to add something to the final string.
I also tried to use JSONPATH in the things channel but here the translation service is not found: [t.generic.ChannelStateTransformation] - Transformation service “JSONPATH for pattern $.DS18B20.Temperature” not found!
Any idea how to solve the unit problem and getting the transformation service working in the things config?