How to start the home assistant core automatically

So you put in bad code for your service. Look at the Exec. You are trying to execute a directory. That cannot come from the service file you posted.

If the file you posted exists and you changed it after to be correct then you need to refresh the daemon as I stated

What do I mean by this? Look at the output of your command, it clearly is:

argv[]=/srv/homeassistant && source bin/activate && hass

So your first command is:

/srv/homeassistant

This is wrong, what you likely would have meant was:

cd /srv/homeassistant

But still, that is not even needed nor is anything you have tried. This thread should be marked as solved as your issue is not understanding what you should do. You do not “write your own” service by executing those commands. All you need to run is the hass command with the proper directory and user which is all in the service file. Further, the fact that you see that output means that:

  1. You wrote the service file wrong
  2. You daemonized it
  3. It didn’t work
  4. You changed the service file to what others and I have written
  5. You never reloaded the changed file

You cannot just change the service file and think it changes anything. You must reload that file per the instructions above. Once you do that, your service will run.