I’m using the new MQTT Binding from OpenHAB 2.4.0.
I’ve a topic that sends a QuantityType in the following format:
Using a MQTT Thing of type string and a JSONPATH transformation I’m able to retrieve “45.7°F” as a string.
Type string : Temperature "Temperature" [ stateTopic="weather/status", transformationPattern="JSONPATH:$.Temp"]
I would like to connect Temperature directly to a QuantityType Number:Temperature and thereby automatically perform the °F -> °C convertion.
I tried to define the MQTT Thing as type number. In this case it never accepts the string “45.7°F”.
I tried to connect the MQTT Thing from type string with an item of type Number:Temperature. It never received any data.
The only working solution so far is an proxy string item:
rule "Temperature_String changed"
Item Temperature_String changed
if ( Temperature_String.state != NULL )
Is there any better idea where the channel can be directly connected with the QuantityType item?