Skip to content

chore(deps): update Home Assistant test baseline #345

Description

@eXPerience83

Context

The repository currently has two intentionally different Home Assistant dependency environments:

  • the normal locked development/test environment in pyproject.toml / uv.lock, currently based on homeassistant==2026.8.0 and pytest-homeassistant-custom-component==0.13.354;
  • the minimum-supported compatibility environment in .github/requirements/minimum-ha.in / .github/requirements/minimum-ha.txt, intentionally pinned to Home Assistant 2026.5.0 and its matching test harness.

The Home Assistant 2026.5.0 floor is a public compatibility contract. The 4.0.0 release preparation treats the increase from 2026.3.0 to 2026.5.0 as a breaking change. Do not raise that minimum again merely to reduce Dependabot findings.

GitHub Dependabot currently reports multiple vulnerable dependencies for this repository. These alerts may originate from one or both lock graphs and are development/CI dependencies rather than packages bundled in the HACS release ZIP. Pollen Levels does not currently ship Home Assistant, pytest, PHACC, or their transitive dependencies inside pollenlevels.zip.

This issue should be handled after the 4.0.0 release work is complete so dependency maintenance does not expand the release PR scope.

Goal

Refresh the normal Home Assistant development/test baseline to the latest compatible Home Assistant 2026.8.x generation available at implementation time, together with the matching pytest-homeassistant-custom-component version, then regenerate the normal uv.lock and measure which Dependabot alerts are resolved.

After that update, audit any remaining Dependabot findings separately, especially those originating from the minimum-HA compatibility lock.

Scope

  • Confirm current main and current dependency pins before changing anything.
  • Review the active Dependabot alerts and record, for each relevant alert:
    • affected package;
    • GHSA/CVE when available;
    • severity;
    • vulnerable version/range;
    • fixed version/range;
    • dependency path / lock source where GitHub exposes it.
  • Classify findings by dependency graph:
    • normal uv.lock / HA 2026.8.x test environment;
    • .github/requirements/minimum-ha.txt / minimum HA 2026.5.0 compatibility environment;
    • other workflow/tooling dependency if applicable.
  • Update the normal Home Assistant pin from 2026.8.0 to the latest appropriate 2026.8.x release available at implementation time.
  • Update pytest-homeassistant-custom-component to the matching compatible release.
  • Keep the normal HA/PHACC pair synchronized; do not update one independently if the harness metadata requires an exact Home Assistant version.
  • Regenerate uv.lock using the repository-required uv version and existing lock policy.
  • Do not use uv lock --upgrade as an unbounded dependency refresh. Keep the update targeted and review all transitive lock movement caused by the HA/PHACC baseline change.
  • Compare Dependabot before/after and document which alerts are resolved by the normal baseline update.
  • Audit remaining alerts in the minimum-HA lock separately instead of automatically raising the supported Home Assistant floor.
  • If a remaining minimum-HA alert has a fixed dependency version that is compatible with Home Assistant 2026.5.0, prefer a focused minimum-lock update that preserves the declared support floor.
  • If a serious/exploitable minimum-HA vulnerability cannot be fixed while retaining Home Assistant 2026.5.0, report that evidence separately before proposing another support-floor change.

Minimum Home Assistant policy

Keep the public minimum supported Home Assistant version at 2026.5.0 for this issue.

Do not change these solely to make Dependabot cleaner:

  • hacs.json minimum Home Assistant version;
  • README minimum-version guidance;
  • .github/requirements/minimum-ha.in Home Assistant floor;
  • AGENTS compatibility guidance.

Changing the public minimum support floor is a compatibility decision and requires separate evidence and release/versioning analysis.

Important dependency boundary

The normal test baseline is not the HACS runtime dependency contract.

The integration package does not declare Home Assistant/pytest/PHACC as integration requirements, and the HACS release ZIP contains the integration source rather than the repository test environments. Treat Dependabot findings seriously for development and CI security, but do not present them as user-installed Pollen Levels runtime packages unless evidence shows otherwise.

Validation

At minimum run the repository-standard checks after the targeted dependency update:

uv lock --check

uv sync --locked --only-group lint
uv run --locked --no-sync ruff check .
uv run --locked --no-sync ruff format --check .

uv sync --locked --only-group test
PYTHONPATH=. uv run --locked --no-sync python -m pytest -q

uv run --locked --no-sync python -m compileall -q custom_components tests

git diff --check

Also verify the hosted gates appropriate to the final diff, including the normal locked test suite, minimum Home Assistant compatibility lane, package validation, hassfest, HACS validation, and workflow/security checks where triggered.

Lockfile review

The PR must explicitly summarize the transitive lock changes introduced by the HA/PHACC update.

Do not accept unrelated dependency churn without explanation. In particular, review security-relevant packages called out by Dependabot and confirm whether the resulting locked versions are fixed or still affected.

Non-goals

  • raising the minimum supported Home Assistant version from 2026.5.0 without separate evidence;
  • changing runtime behavior;
  • changing migration or registry identity;
  • changing entity IDs, unique IDs, device identifiers, forecast attributes, Recorder behavior, or public services;
  • mixing the 4.0.0 release preparation with this dependency maintenance;
  • broad dependency upgrades unrelated to the Home Assistant test baseline;
  • suppressing or dismissing Dependabot alerts simply because affected packages are development-only.

Acceptance criteria

  1. The normal Home Assistant/PHACC test baseline is updated as a matched compatible pair to the selected current 2026.8.x generation.
  2. uv.lock is regenerated reproducibly with the repository-required uv version and all resulting changes are reviewed.
  3. The full normal test suite passes.
  4. The minimum HA 2026.5.0 compatibility lane remains green and the public support floor remains unchanged.
  5. Dependabot findings are compared before and after the update, with resolved and remaining alerts documented.
  6. Remaining minimum-HA findings are assessed on their own security/compatibility merits rather than by automatically increasing the support floor.
  7. No runtime, migration, registry identity, release metadata, or unrelated documentation changes are introduced.

Proposed PR

chore(deps): update Home Assistant test baseline

Keep this as a focused dependency/CI maintenance PR after Pollen Levels 4.0.0 is released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions