1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-20 02:18:59 +00:00

Fix guarding of timezone setting for older OS 16.2 dev builds (#6127)

As some 16.2 dev versions did not support setting of the timezone yet,
if they were not updated before the Supervisor #6099 was merged, the
system could end up unhealthy as setting of the timezone during setup
fails there. This would prevent such systems from being updated to the
new OS version.

Now that we know an exact OS version with TZ setting support, only
attempt doing it if it's supported.
This commit is contained in:
Jan Čermák
2025-08-25 19:47:47 +02:00
committed by GitHub
parent b889f94ca4
commit 580c3273dc

View File

@@ -91,7 +91,7 @@ class SystemControl(CoreSysAttributes):
if ( if (
self.coresys.os.available self.coresys.os.available
and self.coresys.os.version is not None and self.coresys.os.version is not None
and self.sys_os.version >= AwesomeVersion("16.2.dev0") and self.sys_os.version >= AwesomeVersion("16.2.dev20250814")
): ):
_LOGGER.info("Setting host timezone: %s", timezone) _LOGGER.info("Setting host timezone: %s", timezone)
await self.sys_dbus.timedate.set_timezone(timezone) await self.sys_dbus.timedate.set_timezone(timezone)