Hello,
I am stuck trying to extract a value from MQTT and placing in a sensor,I can do this for other MQTT messages but not this one, I have tried using value template as well but just not working.
The message in MQTT explorer is, House/Outside/Temperature with a Value of:
{
“OAT”: 11.645820617675781
}
My Sensor.yaml has the below entry:
platform: mqtt
name: “OAT”
state_topic: “House/Outside/Temperature”
value_template: ‘{{ value.data.OAT }}’ # Outputting data from a topic.
The output I receive on my dashboard / button is this:
Unknown
Hi Tom,
That worked great thank you, I thought I have already done that but obviously not.
I now get a value of 11.976997375488281, how would I reduce the number of decimal places to something like 11.98 ?