Skip to content

Fix Home Assistant 2025 compatibility - #671

Open
2oby wants to merge 1 commit into
georgezhao2010:masterfrom
2oby:ha-2025-compat
Open

Fix Home Assistant 2025 compatibility#671
2oby wants to merge 1 commit into
georgezhao2010:masterfrom
2oby:ha-2025-compat

Conversation

@2oby

@2oby 2oby commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Home Assistant 2025 removed several previously deprecated constants and APIs that this integration depended on. This PR restores compatibility with HA 2025.x (tested on 2025.8.3).

Changes

midea_devices.py and climate.py — deprecated unit string constants

The following constants were removed from homeassistant.const in HA 2025 and replaced with typed enums:

Removed Replacement
TIME_DAYS UnitOfTime.DAYS
TIME_HOURS UnitOfTime.HOURS
TIME_MINUTES UnitOfTime.MINUTES
TIME_SECONDS UnitOfTime.SECONDS
TEMP_CELSIUS UnitOfTemperature.CELSIUS
POWER_WATT UnitOfPower.WATT
VOLUME_LITERS UnitOfVolume.LITERS
ENERGY_KILO_WATT_HOUR UnitOfEnergy.KILO_WATT_HOUR

__init__.pyasync_forward_entry_setup removed

hass.config_entries.async_forward_entry_setup (singular, one platform at a time) was removed. Replaced with async_forward_entry_setups (plural), which takes a list of platforms in a single call.

climate.pyClimateEntityFeature changes

  • ClimateEntityFeature.AUX_HEAT was removed in HA 2025 — deleted from supported_features.
  • ClimateEntityFeature.TURN_ON and TURN_OFF are new in HA 2025 and required for the standard on/off UI controls to work — added to supported_features.

Testing

Tested on Home Assistant 2025.8.3 with an Olimpia Splendid air conditioner (Midea NetHome WiFi board, protocol V3, port 6444). All climate controls (mode, temperature, fan speed, on/off) working correctly.

…ntry_setups, ClimateEntityFeature

- Replace removed homeassistant.const string constants with their HA 2025
  UnitOf* enum equivalents: TIME_*, TEMP_CELSIUS, POWER_WATT, VOLUME_LITERS,
  ENERGY_KILO_WATT_HOUR in midea_devices.py and climate.py
- Fix async_forward_entry_setup (singular, removed) → async_forward_entry_setups
  (plural) in __init__.py; also collapse per-platform for-loops into a single
  batched call as the new API requires
- Remove ClimateEntityFeature.AUX_HEAT (removed in HA 2025) from climate.py
- Add ClimateEntityFeature.TURN_ON and TURN_OFF (new in HA 2025) so the
  standard on/off controls work in the UI

Tested against Home Assistant 2025.8.3 with a Midea-chipset AC unit.
@rokam

rokam commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This project is abandoned. Check https://github.com/wuwentao/midea_ac_lan

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