Receiving MQTT messages

I would like to know how to see the MQTT values pushed to HA.
I have mosquitto installed, and I can see the MQTT-topic if I look in mosquitto (in danish):

Besked 500 er modtaget på 22015/status/percent_remain/value kl. 07.37:

33

QoS: 0 - Retain: false 

I have this in my sensors.yaml:

- platform: mqtt
  state_topic: "22015/status/percent_remain/value"
  name: "Battery1-SOC"

Is this enough? How do I see/use the value/entity?

You can use the software MQTT-Explorer to inspect your MQTT-traffic

Ok, but to me it looks like the data is being sent to my HA. What should I inspect? What values/configuration should I change based on the inspection?
The question for me is something like:
I can see the data in mosquitto. How do I make them usable in HA?

You said you wanted to inspect traffic and values for whatever reason. With MQTT Explorer you can (it will show the traffic for all topics including the HA ones)

What are you trying to find out / achieve?

I would like an entity with the value from state_topic: “22015/status/percent_remain/value”.
Probably a n00b question :slight_smile:

So this didn’t work?

What message is being published to that topic?

No, I can’t find anything in history or developer tools.
I assume the published message can be seen in my first port:

Besked 500 er modtaget på 22015/status/percent_remain/value kl. 07.37:

33

QoS: 0 - Retain: false 

It’s something like message 500 received on 22015/status/percent_remain/value at 07.37:
Value is 33

Did you restart home assistant after creating that mqtt sensor?

You should see a sensor called something like:

sensor.battery1_soc

Facepalm: I thought it was enough to reload the yaml, but a restart solved it.

Thanks and solved…