DHT sensor working but not reporting to HA

Hello, I just uploaded the sketch on my nodeMCU and from the serial monitor it says it’s connected to the broker, and sends temp and hum values… but they don’t show up on HA… I’ve created the sensors and they appear on the frontend, but with a - instead of the actual value…

what might be the problem?

Hello,

Do you see the values appearing in your mqtt broker ?

If you use mosquitto
sudo mosquitto_sub -t +/# -v

no, I do not see them…

also, is the nodemcu supposed to have some leds showing its powered on state? mine only briefly flashes blue when I connect the power, then nothing else

ok, found the problem

the topic stated in the sketch is different than the one in the configuration.yaml example in the wiki… you might want to fix it :wink:

don’t hesitate to modify it directly if you want, you should have the rights to do it

This base off what I Know I Dont use the DHT I have REM it out
Looking at the Code I see

In the .ino i see

image

look like its sending the temp to the MQTT topic “home/DHT/temp”

so the HA sensor show look something like

  - platform: mqtt
    name: "Room Temperature"
    state_topic: "home/DHT/temp" 
    # value_template: "DONT THINK YOU NEED THIS"
    qos: 1
    unit_of_measurement : "°C"

I have a 3rd party program call MQTTFX This let me see the MQTT message letting me know where the problem is

hope this help