MQTT sensor not visible on Lovelace (Ard Nano IoT)

Hello All,

Im completely new to HA but it seems all really cool. I have started a project with a Arduino Nano IoT with a temp and Hum sensor. I send these values by MQTT to HA. It al works if I use Node Red but I would like to use Lovelace cards. So I tried to find good info on this forum, nevertheless I can’t get it working.

As far as I understand I need to adjust the yaml config file, this is what I have done.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


sensor:
  - platform: mqtt
    name: "Frog tank temperature"
    state_topic: "FrogTank/Temperature"
    unit_of_measurement: "°C"
    value_template: "{{ value_json.temperature }}"

No when I use a Gauge card and write as entity:

sensor.Frog_tank_temperature

It states that the entity is not available. I have restarted the broker (which runs on an RPI) allready. But I assume that the issue has to do with the config file or so This shouldn’t be so hard anymore. If it works on Node Red I should be able to get it work on Lovelace a well…I guess.

Could anybody point out to me what I may be doing wrong?

Thanks in advance

That should not be a capital F in Frog. Entity ids are always lower case.

Thanks Tom!

Ok i have changed it and rebooted the broker now I have the message:

Entity is nonnumeric: sensor.frog_tank_temperature

So probably something I still do wrong

Sorry there was another mistake. At the moment it shows me a value of 0. But in the debugger of Node Red I keep seeing the correct temperatures.

When you look in Developer Tools / States, what is the state of sensor.frog_tank_temperature ?

Click —> Open your Home Assistant instance and show your state developer tools.

I think nothing

I have found the issue although I don’t know why it is as it is. I found on the yaml explanation an example where they did not use the comment:

value_template: "{{ value_json.temperature }}"

So I deleted this part of the code and now it is parsing the values correctly to my Gauge

Thanks for the help but case closed

That would be because your mqtt payload is not encoded as json.

Ahhhh clear well good lesson learned