Core - Install more than one venv but keep same HA config directory and database?

I am running Core on the RPi4 with Python 3.9 in venv. Configuration files and database in /home/homeassistant/.homeassistant, venv in /srv/homeassistant/

To test Python3.10 I created another venv in /srv/homeassistant_venv310/ with python3.10 -m venv . and then source bin/activate. Installed wheel with python -m pip install wheel

Just one command left for homeassistant install pip3 install homeassistant BUT, the HA Core install instructions says

This will complete the installation for you, automatically creating the .homeassistant configuration directory in the /home/homeassistant directory, and installing any basic dependencies.

So my question is:
Will this overwrite anything in /home/homeassistant/.homeassistant (my original running install) and mess up?

I upgraded python version and the related venvs over the years and the config directory was never affected. I’m not using the default $HOME/.homeassistant though, but homeassistant_conf and homeassistant_test for the production and test environments.

If you want to be on the safe side just make a backup of your $HOME/.homeassistant directory.

1 Like

Thank you for suggesting the backup, which I did. Then installed homeassistant in the new venv, tested with the hass command and lastly changed the path in /etc/systemd/system/[email protected] and rebooted. Everything works like before, but now running on python 3.10 instead of 3.9

just to confirm, same procedure done here about two weeks ago
I create a new venv with a new install of homeassistant when I update Python, keeping the old venv in case there are issues ( lirc for a infrared receiver needed some special handling this time) and can switch between old and new venv in the systemd-service

Pulling the dependencies takes quite a while, had about 1 hour downtime, of course depends on hardware (PI4 with SSD here) and internet connection.