Thanks for the suggestions.
I made a second venv. Because it is homeassistant related I used the same user.
cd /srv
sudo mkdir esphome
sudo chown homeassistant:homeassistant esphome
sudo -u homeassistant -H -s
cd /srv/esphome
python3 -m venv .
source bin/activate
python3 -m pip install wheel
pip3 install esphome
pip3 install tornado esptool
In /etc/systemd/system/ i made a service
I made a service [email protected]
with the following content
[Unit]
Description=ESPHome
[email protected]
[email protected]
[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant/esphome
ExecStart=/srv/esphome/bin/esphome -c "esphome config/ dashboard"
[Install]
WantedBy=multi-user.target
I started the service and journalctl gives:
May 27 19:24:56 HomePiOne systemd[1]: Started ESPHome.
May 27 19:24:57 HomePiOne esphome[7307]: usage: esphome [-h] [-v] [-q]
May 27 19:24:57 HomePiOne esphome[7307]: [configuration [configuration ...]]
May 27 19:24:57 HomePiOne esphome[7307]: {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,clean,dashboard,vscode,update-all}
May 27 19:24:57 HomePiOne esphome[7307]: ...
May 27 19:24:57 HomePiOne esphome[7307]: esphome: error: argument command: invalid choice: 'esphome config/ dashboard' (choose from 'config', 'compile', 'upload', 'logs', 'run', 'clean-mqtt', 'wizard', 'mqtt-fingerprint', 'version', 'cle
May 27 19:24:57 HomePiOne systemd[1]: [email protected]: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 27 19:24:57 HomePiOne systemd[1]: [email protected]: Failed with result 'exit-code'.
Something is wrong with the line
ExecStart=/home/homeassistant/.homeassistant/esphome -c "esphome config/ dashboard"
Any idea’s?