Skip to content

Update minimum Home Assistant version - #1851

Open
hmmbob wants to merge 1 commit into
AlexxIT:masterfrom
hmmbob:agent/update-minimum-ha-version
Open

Update minimum Home Assistant version#1851
hmmbob wants to merge 1 commit into
AlexxIT:masterfrom
hmmbob:agent/update-minimum-ha-version

Conversation

@hmmbob

@hmmbob hmmbob commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Update the declared and enforced minimum Home Assistant version from 2023.2 to 2025.6, and remove version branches that can no longer be reached.

Why 2025.6?

The current 2023.2.0 declaration no longer matches the APIs used by the integration:

  • XFan17 unconditionally uses FanEntityFeature.TURN_ON and TURN_OFF. Home Assistant introduced those flags in 2024.8.

  • More importantly, the test suite exposes a concrete runtime incompatibility with Home Assistant 2025.5. In that release, SelectEntity._attr_current_option is only annotated, without a default. XStartup does not set the attribute when a device does not report startup, so writing its initial state raises:

    AttributeError: 'XStartup' object has no attribute '__attr_current_option'
    
  • Home Assistant 2025.6 sets _attr_current_option to None, and the complete SonoffLAN suite passes without a compatibility patch. Home Assistant 2025.6 also requires Python 3.13.2, which is reflected in the backward-compatibility test.

This makes 2025.6 the first Home Assistant release that satisfies the current code and test suite as-is. It is also more than a year old at the time of this change, so adding another shim solely for 2025.5 and older would preserve an already stale compatibility target instead of documenting the integration's real lower bound.

Changes

  • Set the HACS minimum and runtime guard to Home Assistant 2025.6.
  • Update the backward-compatibility assertions for Home Assistant and Python.
  • Remove unreachable compatibility branches for:
    • climate feature flags before Home Assistant 2024.2;
    • fan feature flags before Home Assistant 2024.8;
    • the alarm control panel state API before Home Assistant 2024.11.

Validation

  • Home Assistant 2025.5.0, excluding the intentional minimum-version assertion: fails in test_pow2_energy with the XStartup._attr_current_option AttributeError above.
  • Home Assistant 2025.6.0: 94 passed.
  • Current Home Assistant beta: 94 passed.

This PR is intentionally separate from #1850 and does not change concentration-unit compatibility.

@hmmbob
hmmbob marked this pull request as ready for review July 31, 2026 11:57
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