ci: support one year of Home Assistant releases (#1546)

This commit is contained in:
Bas Nijholt 2026-09-06 12:17:22 +02:00 • committed by GitHub
commit a04a533f45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 86 deletions

View file

@ -15,9 +15,9 @@ import re
import urllib.request
from pathlib import Path
# Minimum HA Core version to include in the test matrix
# This should be the oldest version we want to support
MIN_VERSION = (2024, 12)
# Keep the latest stable release month and the preceding 12 monthly release lines.
# Update this explicit floor when dropping another supported release month.
MIN_VERSION = (2025, 9)
def get_ha_core_versions() -> list[str]:
@ -82,11 +82,8 @@ def get_python_version(ha_version: str) -> str:
"""Determine Python version based on HA Core version."""
parts = ha_version.split(".")
year, month = int(parts[0]), int(parts[1])
# 2024.x and 2025.1 use Python 3.12.
# 2025.2 through 2026.2 use Python 3.13.
# 2025.9 through 2026.2 use Python 3.13.
# 2026.3+ uses Python 3.14.
if year == 2024 or (year == 2025 and month == 1):
return "3.12"
if year > 2026 or (year == 2026 and month >= 3):
return "3.14.2"
return "3.13"