Help my Axolotl (water temp sensor over mqtt)

Hey folks,

I’m pretty new to the land of home assistant, currently just playing around as I prepare to automate my new home (if the builders ever finish!). I have successfully installed HA and integrated a few smart devices (Hue, LGTV etc) and decided to step up to something a little more advanced as I’m a maker at heart and have a number of self-built iOT devices that I would love to hook up to HA via MQTT.

So this project is my first step into this world. We have a pet Axolotl who requires specific water temperatures, so a year or so back I set up a Pimoroni Badger (Pi Pico RP2040 with e-ink display) connected to a one-wire DS18B20 waterproof temperature sensor to display the value on the e-ink screen. Pimoroni just released the Badger W with wifi so of course, I decided to upgrade my display and have it publishing its temperature once a minute over MQTT (using umqtt-simple in MicroPython). I have successfully managed to have that read by HomeAssistant as an entity but on my dashboard, I have “unknown” in big letters.

On my Hue sensors, it shows the current value where I’m currently seeing “unknown”. Does anyone know how I can fix this? This is the YAML for my entity:

mqtt:
  sensor:
    - name: "Axolotl Tank Temperature"
      unique_id: "AxTemp001"
      unit_of_measurement: 'C'
      device_class: "temperature"
      icon: "mdi:thermometer"
      state_topic: "home/axolotl/temp"

I’m sure I’m doing something a bit squiffy here, I have noticed in other similar questions that people are using value_template but that seems to imply the use of JSON in the MQTT request, whereas I’m just sending a numerical value as this sensor does one thing only.

I really appreciate any pointers you might have.

Thanks folks!

ok this is very weird! I just installed the latest HA update and now the temperature is showing as intended!

@hellweaver666 would you like to share some details of the Badger side of what you did? I’ve just been donated a Badger2040W and looking for “interesting” ways to use it in my home!

sorry for the slow response, I’m not on here much. Basically it’s a one wire temperature sensor connected to the Badger using a grove to stemma/quicc adapter and it’s just firing over the sensor readings via MQTT.

@hellweaver666 No problem, I’m still not sure what to do with it, a few ideas crop up now and then, but nothing that seems to be that good an idea!

I was interested in what the Badger setup you used and the code. I haven’t really sat down and tried to work out what I can do, let alone what I might do!