Skip to content

Commit bd1c7a3

Browse files
committed
[midea] Add WiFi library for ESPHome 2026.2.0 compatibility
ESPHome 2026.2.0 selective Arduino compilation requires explicit WiFi library declaration to make Network headers available for MideaUART.
1 parent dbe458c commit bd1c7a3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

esphome/components/midea/climate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
UNIT_PERCENT,
3131
UNIT_WATT,
3232
)
33-
from esphome.core import coroutine
33+
from esphome.core import CORE, coroutine
3434

3535
CODEOWNERS = ["@dudanov"]
3636
DEPENDENCIES = ["climate", "uart"]
@@ -290,4 +290,7 @@ async def to_code(config):
290290
if CONF_HUMIDITY_SETPOINT in config:
291291
sens = await sensor.new_sensor(config[CONF_HUMIDITY_SETPOINT])
292292
cg.add(var.set_humidity_setpoint_sensor(sens))
293+
# MideaUART library requires WiFi (WiFi auto-enables Network via dependency mapping)
294+
if CORE.is_esp32:
295+
cg.add_library("WiFi", None)
293296
cg.add_library("MideaUART", None, "https://github.com/rrelande/MideaUART.git#adding-light")

0 commit comments

Comments
 (0)