Upgrade Hassbian installation to Debian Bullseye in order to get python 3.9
Update OS. Follow another guide, except also remember to update all of the other /etc/apt/sources.list.d/ files too. :) Note that there is no hassbian-scripts repo for bullseye, so just leave that one at buster. https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster
Update hassbian-scripts, which likely got removed at the automremove step - removing your systemd unit and all sorts of other things. The scripts package available on gitlab is broken, but there's a fork with a few fixes (primarily python package deps).
git clone https://github.com/dannysauer/hassbian-scripts.git
cd hassbian-scripts
./make_package.sh
sudo dpkg --install ./hassbian-scripts_0.13.1+danny.1.deb
Update the venv to use python 3.9
sudo -u homeassistant -i
python3.9 -m venv --upgrade /srv/homeassistant/
Restart homeassistant - this will take a while, since it'll update a bunch of modules
sudo systemctl restart [email protected]
Resume upgrading HomeAssistant. 2021.2 was the first version to require Python 3.9, and I prefer to only update to the last patch release of each minor revision. That should be the most stable of a minor release. I read the blog post with all the changes in that minor release before upgrading to avoid surprises.
sudo systemctl stop [email protected]
sudo -u homeassistant -i
hapyshell
pip install --upgrade homeassistant==2021.2.3
sudo systemctl start [email protected]