Senor Config Help

I currently have a ESP8266 sending temperature and humidity readings to a MQTT server, I then am trying to use HA to read those values on the MQTT server. But i cant get HA to show any senors or readings.

what i know:

  • HA connects to the MQTT server based on the server logs.
  • MQTT is getting values from the ESP8266 and storing them.

Not sure what im doing wrong. i have 2 different Sensors to see if anything works.

mqtt:
  broker: m13.cloudmqtt.com
  port: 15982
  username: user
  password: user

sensor2:
  platform: mqtt
  name: "Humidity"
  state_topic: "sensor/humidity"
  
sensor3:
  - platform: mqtt
    name: "Temperature"
    state_topic: "sensor/temperature"

I think the problem is your yaml

sensor2:

will not be recognized by HA.as sensors

try

sensor:
  - platform: mqtt
    name: "Humidity"
    state_topic: "sensor/humidity"

  - platform: mqtt
    name: "Temperature"
    state_topic: "sensor/temperature"