Skip to content

Remove obsolete Home Assistant compatibility fallbacks - #2907

Open
hmmbob wants to merge 5 commits into
al-one:masterfrom
hmmbob:agent/remove-obsolete-ha-fallbacks
Open

Remove obsolete Home Assistant compatibility fallbacks#2907
hmmbob wants to merge 5 commits into
al-one:masterfrom
hmmbob:agent/remove-obsolete-ha-fallbacks

Conversation

@hmmbob

@hmmbob hmmbob commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Related to #2905, which is closed by #2906.

  • Remove compatibility fallbacks for Python 3.10 and Home Assistant versions older than the repository's declared minimum.
  • Import ServiceResponse, SupportsResponse, and DATA_CUSTOMIZE directly from Home Assistant.
  • Load AlarmControlPanelState, CameraState, and VacuumActivity with their own platforms instead of from shared constants, so importing the integration core does not load unrelated component dependencies.
  • Remove the unused JsonObjectType compatibility export.
  • Remove dead SupportsResponse guards and always register response support.
  • Add tests that verify the direct Home Assistant symbols and both service-registration paths.

Compatibility

hacs.json declares Home Assistant 2025.6.0 as the minimum version. Home Assistant 2025.6.0 requires Python 3.13.2 or newer and already exposes every symbol imported directly by this change.

The UnitOfDensity and UnitOfRatio fallback introduced by #2906 is intentionally retained because those enums were not added until Home Assistant 2026.7.

This is a stacked PR based on #2906. Please merge #2906 first; once it is merged, GitHub will reduce this PR to the cleanup-only commits.

Validation

  • Verified every direct import against the Home Assistant 2025.6.0 source and runtime.
  • Official Home Assistant 2025.6.0 container, Python 3.13.3: direct-import runtime check passed.
  • Home Assistant 2025.6.0 minimum test environment: 174 passed for the combined Fix deprecated concentration constants #2906 + cleanup branch.
  • Upstream pytest checks passed with both minimum and stable Home Assistant.
  • Upstream HACS, Hassfest, and Home Assistant configuration checks passed with minimum, stable, and dev Home Assistant.
  • Home Assistant 2026.8.0b2 container: combined branch imported successfully without concentration deprecation warnings.
  • Home Assistant 2026.8.0b2 container: camera, alarm control panel, and vacuum platforms imported successfully with their native state enums.
  • python -m compileall, git diff --check, and the three focused compatibility tests passed.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@hmmbob
hmmbob marked this pull request as ready for review July 31, 2026 09:59
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant