MQTT when_setup callback error

Having issues with mqtt in a new install. Had it perfectly running on the same machine, Ubuntu 18.04, but got into so many issues with the 0.86.x upgrade so I decided to start over. Now i’m getting an error I can’t figure out. Guessing it’s something simple I forgot.

Running Mosquitto on the same server as HA. Doing a mosquitto_sub from command line shows incoming messages, even publishing a message from HA GUI works, it shows up in the mosquitto_sub on the command line. But the log when starting HA shows:

2019-01-30 14:31:34 ERROR (MainThread) [homeassistant.setup] Error handling when_setup callback for mqtt
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/setup.py", line 263, in when_setup
    await when_setup_cb(hass, component)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/owntracks/__init__.py", line 115, in async_connect_mqtt
    context.mqtt_topic, async_handle_mqtt_message, 1)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/mqtt/__init__.py", line 319, in async_subscribe
    qos, encoding)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/mqtt/__init__.py", line 696, in async_subscribe
    raise HomeAssistantError("Topic needs to be a string!")
homeassistant.exceptions.HomeAssistantError: Topic needs to be a string!

Help is much appreciated :slight_smile:

I would think its something in your configuration file that is the problem. Check the MQTT sensors, switches and triggers.

But why didn’t you just go back to the previous version of HA, rather than re-install?

Well, I’ve been testing a lot of things so I wanted to start fresh again.

Did a test with docker and just adding my mqtt and owntracks configuration and that works straight away. Could I be missing a dependency or something?

That is not what the error is saying. A missing dependency is normally very specific.