{"id":1549,"date":"2025-01-15T22:19:15","date_gmt":"2025-01-15T21:19:15","guid":{"rendered":"http:\/\/www.thelins.se\/johan\/blog\/?p=1549"},"modified":"2025-01-15T22:19:15","modified_gmt":"2025-01-15T21:19:15","slug":"upgrading-home-assistant","status":"publish","type":"post","link":"https:\/\/www.thelins.se\/johan\/blog\/2025\/01\/upgrading-home-assistant\/","title":{"rendered":"Upgrading Home Assistant"},"content":{"rendered":"\n<p>I run Home Assistant Core on a Raspberry Pi. I installed it in a Python venv and now and then I feel a need to upgrade. Today was such a day.<\/p>\n\n\n\n<p>So, having backed everything up, I went for the plunge. Let&#8217;s install version 2025.1.2.<\/p>\n\n\n\n<p>The usual dance goes a bit like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl stop homeassistant\nsudo su homeassistant\ncd \/opt\/homeassistant\nsource bin\/activate\npip install --upgrade homeassistant\nexit\nsudo systemctl start homeassistant<\/code><\/pre>\n\n\n\n<p>Then all the dependencies are installed, so I usually go for a coffee, and once things have settled down (I use <code>top<\/code> to check that the system is idle), I usually restart homeassistance, just to make sure that it stops and starts nicely.<\/p>\n\n\n\n<p>This time, I had no such luck. Lots of little issues. The major one seemed to be that <code>import av<\/code> in one of the core modules suffered from some sort of <code>ValueError<\/code> exception.<\/p>\n\n\n\n<p>Having duckducked the issue for a while, I realized this meant that I had to do the upgrade from Python 3.12 to 3.13. Upgrading <code>va<\/code> to version 14.x using <code>pip<\/code> does not help. Since I always forget how to do this, I&#8217;m now writing this blog post.<\/p>\n\n\n\n<p>Recollecting the steps, the moves are, more or less these:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install python3.13 python3.13-venv python3.13-dev\nsudo systemctl stop homeassistant\nsudo su homeassistant\ncd \/opt\/homeassistant\nmkdir old\nmv bin\/ cache\/ include\/ lib\/ lib64 LICENSE pyvenv.cfg share\/ old\npython3.13 -m venv .\nsource bin\/activate\npip install homeassistant\nexit\nsudo systemctl start homeassistant<\/code><\/pre>\n\n\n\n<p>Again, restarting Home Assistant takes a while and a bit more since all the dependencies are built. Go grab a snack or just a quiet coffee and, viola, you will end up with a fresh install of Home Assistant version 2025.1.2<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.thelins.se\/johan\/blog\/wp-content\/uploads\/2025\/01\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"661\" src=\"https:\/\/www.thelins.se\/johan\/blog\/wp-content\/uploads\/2025\/01\/image.png\" alt=\"\" class=\"wp-image-1553\" srcset=\"https:\/\/www.thelins.se\/johan\/blog\/wp-content\/uploads\/2025\/01\/image.png 930w, https:\/\/www.thelins.se\/johan\/blog\/wp-content\/uploads\/2025\/01\/image-300x213.png 300w, https:\/\/www.thelins.se\/johan\/blog\/wp-content\/uploads\/2025\/01\/image-768x546.png 768w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I run Home Assistant Core on a Raspberry Pi. I installed it in a Python venv and now and then I feel a need to upgrade. Today was such a day. So, having backed everything up, I went for the plunge. Let&#8217;s install version 2025.1.2. The usual dance goes a bit like this: Then all &hellip; <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2025\/01\/upgrading-home-assistant\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Upgrading Home Assistant<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-1549","post","type-post","status-publish","format-standard","hentry","category-home-assistant"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/comments?post=1549"}],"version-history":[{"count":1,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1549\/revisions"}],"predecessor-version":[{"id":1554,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1549\/revisions\/1554"}],"wp:attachment":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/media?parent=1549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/categories?post=1549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/tags?post=1549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}