mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-06 09:29:31 +00:00
* Store and persist OS upgrade map to fix update path evaluation The existing logic calculated OS upgrade paths inline during fetch_data, which will not get reevaluted when the current OS is unsupported (JobCondition.OS_SUPPORTED). E.g. after updating from 11.4 to 11.5, the system wouldn't offer the next available update (15.2) because the upgrade path calculation relied on fresh data from the blocked fetch operation. Changes: - Add ATTR_HASSOS_UPGRADE constant and schema validation - Store hassos-upgrade map from version JSON in updater data - Refactor version_hassos property to use stored upgrade map instead of inline calculation during fetch_data - Maintain upgrade path logic: upgrade within major version first, then jump to next major version when at the latest in current major - Add type safety checks for version.major access This ensures upgrade paths work correctly even when update data refresh is blocked due to unsupported OS versions, fixing the scenario where HAOS 11.5 wouldn't show 15.2 as the next available update. * Update supervisor/updater.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address mypy issue * Fix pytest --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>