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!