MQTT Errors every time I reboot my HA device

I have HA installed on small PC. I use Debian and Python Virtual Env. This is how I configured the service file for HA:

Description=Home Assistant mosquitto.service

ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"


The problem is that every time I reboot my device, I have the following errors on the Home screen:

Invalid config

The following components and platforms could not be set up:


Please check your config.

The only way that I found how to fix it is to restart HA service manually. My guess is I need to delay start of the HA service, but I cannot find how to do this.

Can someone help me with this?

Thank you.

A couple of ideas in this thread