fix: restore hassfest and Home Assistant CI

## Summary
- fix hassfest validation by replacing raw options-description URLs with Home Assistant translation placeholders
- extend the pytest CI matrix to cover the latest patch release for each Home Assistant month, plus dev
- align CI/dev container Python versions and tests with newer Home Assistant behavior

## Validation
- GitHub Actions pytest matrix passed for 2024.12.5 through 2026.4.3 plus dev
- Docker passed for linux/amd64 and linux/arm64
- hassfest, HACS validation, pre-commit, pre-commit.ci, markdown-code-runner, docs build, and Release Drafter passed
This commit is contained in:
Bas Nijholt 2026-04-24 11:31:53 -07:00 • committed by GitHub
commit c4b8e28ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 104 additions and 42 deletions

View file

@ -82,9 +82,13 @@ 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+ use Python 3.13
# 2024.x and 2025.1 use Python 3.12.
# 2025.2 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"
@ -97,7 +101,7 @@ def generate_matrix_yaml(versions: list[str]) -> str:
lines.append(f' python-version: "{python_ver}"')
# Add dev version
lines.append(' - core-version: "dev"')
lines.append(' python-version: "3.13"')
lines.append(' python-version: "3.14.2"')
return "\n".join(lines)