Hi, I thought I had a simple MQTT sensor setup. This is what i’m receiving on a mqtt topic:
{“tags”:{“type”:“air”,“id”:“Woonkamer2 Lucht”},“values”:{“temp”:26.13,“hum”:56.76,“co2”:448,“pm10”:10,“pm25”:9}}
and this is the value_template i’m using:
value_template: ‘{{ value_json.values.co2 }}’
Great investigation! I tried it by hand with values2 and it seemed to work. The sad news is that it is almost impossible for me to change that in my my ‘production’ setup. I was looking for more documentation on this issue, but haven’t found it
I have many adapters/micro-services (>10) that use this format in multiple languages: multiple sensors, automatic mqtt->influxdb storage, custom dashboard, hololens app, etc. I could clone all messages on a new topic and do a small rewrite, but it seems quite silly. I expect there is a better solution - my experience with HA is minimal - or at a good explanation+doc. on this issue.