Skip to content

Sync Integration with 2026.01 version of HAOS#757

Open
reminchev wants to merge 26 commits intowuwentao:masterfrom
reminchev:master
Open

Sync Integration with 2026.01 version of HAOS#757
reminchev wants to merge 26 commits intowuwentao:masterfrom
reminchev:master

Conversation

@reminchev
Copy link

Description

Updates the integration for compatibility with Home Assistant 2026.1.0 by removing deprecated backwards compatibility flags and version checks that are no longer necessary.

Changes

climate.py

  • Removed _enable_turn_on_off_backwards_compatibility flag from MideaClimate base class (marked for removal after 2025.1)
  • Removed MAJOR_VERSION and MINOR_VERSION imports (no longer needed)
  • Simplified supported_features property in all climate classes to directly include TURN_OFF and TURN_ON features:
    • MideaClimate
    • MideaCFClimate
    • MideaC3Climate
    • MideaFBClimate
  • Removed conditional version checks if (MAJOR_VERSION, MINOR_VERSION) >= (2024, 2) as these features are now standard

fan.py

  • Removed _enable_turn_on_off_backwards_compatibility flag from MideaFan base class (marked for removal in 2024.8~2025.1 window)

Motivation

The _enable_turn_on_off_backwards_compatibility flags were introduced to maintain compatibility with older Home Assistant versions (pre-2024.2). With Home Assistant 2026.1.0, the TURN_ON and TURN_OFF features for climate and fan entities are now standard, making these compatibility shims unnecessary.

Removing these flags and version checks:

  • Simplifies the codebase
  • Reduces maintenance burden
  • Aligns with Home Assistant's deprecation timeline
  • Improves code readability

Testing

  • ✅ All Python files pass syntax validation (python -m py_compile)
  • ✅ No breaking changes to existing functionality
  • ✅ All climate and fan entities will continue to work with standard turn on/off features

Compatibility

  • Minimum Home Assistant version: Should remain at current requirement (the changes only remove backwards compatibility for older versions)
  • Target version: Home Assistant 2026.1.0+
  • Breaking changes: None for users running HA 2024.2+

Related Issues

Follows the deprecation timeline mentioned in the code comments:

  • Climate: "maybe remove after 2025.1"
  • Fan: "2024.8~2025.1"

Checklist

  • Code follows project style guidelines
  • All files pass Python syntax validation
  • Changes are backwards compatible for HA 2024.2+
  • Removed deprecated code as per inline comments

reminchev and others added 22 commits January 10, 2026 19:59
midea-local==6.5.0
- Updated manifest.json to point to reminchev repository
- Removed deprecated MAJOR_VERSION and MINOR_VERSION
- Updated all code for HA 2026.1.1 compatibility
- Added Bulgarian translation (bg.json)
- Added DNS troubleshooting guides
- Updated hacs.json with proper configuration
…3 / HA 2026.1.1

Required for Python 3.11+ when using TypeAlias and forward type references.
This fixes module import errors in HA 2026.1.1 with Python 3.13.
@chemelli74
Copy link
Collaborator

Hi, thank you for the contribution!

Please split this PR in multiple PR.
The rule of thumb is: 1 PR -> 1 scope (either fix, feature or docs)

@wuwentao
Copy link
Owner

@reminchev thanks for your PR.
there is a contributing guide doc: https://github.com/wuwentao/midea_ac_lan?tab=contributing-ov-file
maybe we can try with this to quickly fix github action error.

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.

3 participants