Allow upgrade when using {os_name} in URL (#2974)

Once {os_name} is part of the update URL we also need to set the OS name
explicitly for upgrades: A user might use a new Supervisor version on a
OS release 5 device. The device will still use "hassos" as OS name.
Before introducing {os_name}, the new OS name was part of the URL. Now
when {os_name} is used, we need to adjust the name for upgrade as well.
This commit is contained in:
Stefan Agner 2021-06-24 08:39:50 +02:00 committed by GitHub
parent ece40008c7
commit 7bbfb60039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,8 @@ class HassOS(CoreSysAttributes):
# The OS name used to be hassos before renaming to haos...
if version < 6.0:
update_os_name = "hassos"
else:
update_os_name = "haos"
url = raw_url.format(
version=str(version), board=update_board, os_name=update_os_name