Hi Friends.
i have built an arduino based temperature sensor (among other functionalities) and am able to get data on my mqtt server. The temperatures are not encoded as JSON rather a simple value say 30.25 degrees under tele/mega-gate/sensors/temp0 topic.
Now, i’m trying to create a sensor in home assistant that will get this value, however all recommendation to do this are based on tasmota or similar where the payloads are encoded as JSON.
- platform: mqtt
state_topic: 'tele/mega-gate/sensors/temp0'
name: 'HA box temp'
device_class: temperature
availability_topic: 'tele/mega-gate/LWT'
payload_available: "Online"
payload_not_available: "Offline"
value_template: '{{ value_json["temp0"] }}'
i cannot get any value from the HA sensor, but of course the arduino and temperature sensors are working normally, posting the temperature readings to MQTT