Hi!
I have an installation with several temperature sensors set up via MQTT auto discovery but in the UI it will not show the temperature value, instead it shows the JSON published on the state topic. For my novice eyes, the configuration looks correct so what am I missing?
The config for one of the sensors is published on the topic
homeassistant/sensor/215_telldus/temperature/config
and it looks like this (reformatted to be more readable):
{
"device": {
"name": "215_temperaturehumidity",
"identifiers": [
"215_temperaturehumidity"
],
"model": "temperaturehumidity",
"manufacturer": "fineoffset"
},
"unique_id": "215_telldus_temperature",
"name": "telldus_215_temperature",
"state_topic": "telldus/215/temperature/state",
"state_value_template": "{{ value_json.temperature }}",
"device_class": "temperature",
"unit_of_measurement": "°C"
}
From the mqtt_dump.txt
file:
telldus/215/temperature/state,{"temperature": "-9.4"}
This will show up as
{“temperature”: “-9.4”} °C
in the Home Assistant UI. My expectation is that it would show
-9.4 °C
and that the graph will be drawn when looking inside but it is blank.
It seems like the state_value_template
is not applied for the incoming state update.
Is there some apparent problem in the configuration or is my expectation faulty?
How can I debug this further? Since I am a software developer by trade, I have tried navigating the code to figure out what is supposed to happen but I have not really found my way in there.
Regards