Update Home Assistant Automatically

I had to turn off the updater component because that little icon in the UI telling me there is a new version of HA would bug me until I’d SSH into my server and manually run an update.

Here’s a bash script that pulls the latest HA docker image and recreates your container. Place this image in the same location as the docker-compose.yaml file containing your HA set up.

docker pull homeassistant/raspberrypi3-homeassistant
docker stop hass
docker-compose up hass

# commit the version file
cd ~/ha
git add .HA_VERSION
git commit -m "updated to v$(cat .HA_VERSION)"
git push

Then follow these instructions these instructions to set up a CRON job and you’re done! I set mine to update monthly.