Hello,
I’ve managed to post to local Mosqito server a topic “DHT22/json”. I can’t separate them to a different topics.
The data comes correctly like this:
*{"system":{"hostname":"ESP001189E4","uptime":5400,"rssi":-39,"freemem":28912},"sensors":{"dhtt1":20.5,"dhth1":41.4}}*
My configuration.yaml file looks like this:
# MQTT Sensor Example configuration.yaml entry
mqtt:
broker: 127.0.0.1
username: local
password: local
sensor:
- platform: mqtt
unique_id: ESP001189E4Temp
name: "Temperature"
state_topic: "DHT22/json"
unit_of_measurement: "°C"
value_template: "{{ value_json.dhtt1 }}"
- platform: mqtt
unique_id: ESP001189E4Humid
name: "Humidity"
state_topic: "DHT22/json"
unit_of_measurement: "%"
value_template: "{{ value_json.dhth1 }}"
But the readings dispayed is always 0.
Please help. I dont’t know how to read correct value on my dashboard?