EDIT: Solved. Code updated to comment out availability section.
Hi all, this is my first time trying to add a custom mqtt sensor to HA through the configuration.yaml
I have setup a raspberry pi pico w to publish messages via mqtt. I can see these messages when using the MQTT listen to a topic functionality. Also can see the data coming through as a subscribed topic under the device created.
HI
Indentation of the yaml lines is very important. You are more likely to get a response if you show it like in example below. You could just be making a simple mistake in how you are indenting your code.
I think I figured it out. I basically commented out most lines of code, and began with a basic sensor, then slowly removed the # from each line.
The issue seems to be coming from the availability topic, where I am using the same path as the state topic. It doesn’t seem to like that for checking availability.
At the moment I have got it working with a very basic payload of just one parameter. Later on I will look to add more parameters being sent such as battery level and so forth.