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:
@@ -91,7 +91,7 @@ class SystemControl(CoreSysAttributes):
|
||||
if (
|
||||
self.coresys.os.available
|
||||
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)
|
||||
await self.sys_dbus.timedate.set_timezone(timezone)
|
||||
|
||||
Reference in New Issue
Block a user