Auto detection for MQTT devices is a bit tricky. I struggled with that myself when I was trying to incorporate data from a web scraper I wrote. This config file here shows what I ended up with to create auto detecting sensors in HA https://github.com/chunkystyles/reservationsScraper/blob/main/mqttConfig.json
Each one of the devices gets registered at start up of the app.
If I were doing this all over again, I probably wouldn’t use auto detect sensors. I’d manually configure them. Here’s some examples of that kind of configuration I used for some HVAC remote devices I built:
mqtt:
sensor:
- name: "makerfabs_remote_1"
state_topic: "makerfabs/hvacremote/1/status_out"
force_update: true
expire_after: 125
- name: "makerfabs_remote_2"
state_topic: "makerfabs/hvacremote/2/status_out"
force_update: true
expire_after: 125
- name: "makerfabs_remote_3"
state_topic: "makerfabs/hvacremote/3/status_out"
force_update: true
expire_after: 125
- name: "makerfabs_remote_4"
state_topic: "makerfabs/hvacremote/4/status_out"
force_update: true
expire_after: 125
For these to work, you just put them in your “configuration.yaml” file in HA.
Pre hard mode is pretty basic today, but was pretty neat back when it came out.
Post hard mode is a lot more interesting. I’d say don’t give up on it until you get there.