Skip to content

Instantly share code, notes, and snippets.

@dannysauer
Created November 28, 2021 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannysauer/6e715afe27d8017d68e4bcf3c4563368 to your computer and use it in GitHub Desktop.
Save dannysauer/6e715afe27d8017d68e4bcf3c4563368 to your computer and use it in GitHub Desktop.
Hassbian notes

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 home-assistant@homeassistant.service

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 home-assistant@homeassistant.service
sudo -u homeassistant -i
hapyshell
pip install --upgrade homeassistant==2021.2.3
sudo systemctl start home-assistant@homeassistant.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment