Not all MQTT threads are auto-discovered

I have a battery-powered soil moisture sensor that I made that is built off of an ESP 8266 that updates to MQTT and then goes into deep sleep.

The soil moisture sensing part has been going great, though my attempt to add battery status has not gone well.

The moisture sensor outputs an analog signal, so the ADC is used for that. To get around the limitation of one ADC, I added a small MOSFET that is used to switch between sensing the battery’s voltage and the moisture sensor.

This all works, and data is published to MQTT, though the battery is not auto-discovered by Home Assistant when the moisture sensor is. This has persisted over many restarts and updates, so I am not sure what is wrong. See the MQTT explorer screenshot below for the topic setup:


If anyone can help me get the battery to show up in Home Assistant, that would be great!