diff --git a/esphome/components/midea/appliance_base.h b/esphome/components/midea/appliance_base.h index a866d3f51ba..bce433394b0 100644 --- a/esphome/components/midea/appliance_base.h +++ b/esphome/components/midea/appliance_base.h @@ -18,6 +18,13 @@ namespace esphome::midea { +// Mirrors the ARDUINO switch in MideaUART Helpers/Platform.h: these types +// exist in the dudanov namespace exactly when the library is not on Arduino +#ifndef ARDUINO +using dudanov::Stream; +using dudanov::String; +#endif + /* Stream from UART component */ class UARTStream : public Stream { public: diff --git a/esphome/components/midea/climate.py b/esphome/components/midea/climate.py index 292e7215a93..0e03bca2336 100644 --- a/esphome/components/midea/climate.py +++ b/esphome/components/midea/climate.py @@ -313,5 +313,5 @@ async def to_code(config): cg.add_library( name="MideaUART", version=None, - repository="https://github.com/dudanov/MideaUART.git#7a4d1e9a4b6f07a3464c2453ee828c0c7b7e1bcf", + repository="https://github.com/dudanov/MideaUART.git#eeea6c3e9b4474f067054592b435be1c4e466815", ) diff --git a/platformio.ini b/platformio.ini index adc19954405..bf3b0685f8c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -44,7 +44,7 @@ lib_deps_base = lib_deps = ${common.lib_deps_base} - https://github.com/dudanov/MideaUART.git#7a4d1e9a4b6f07a3464c2453ee828c0c7b7e1bcf ; midea + https://github.com/dudanov/MideaUART.git#eeea6c3e9b4474f067054592b435be1c4e466815 ; midea esphome/noise-c@0.1.11 ; api improv/Improv@1.2.6 ; improv_serial / esp32_improv kikuchan98/pngle@1.1.0 ; online_image diff --git a/tests/components/midea/test.esp32-idf.yaml b/tests/components/midea/test.esp32-idf.yaml index ae12002b316..5ad22b5b93c 100644 --- a/tests/components/midea/test.esp32-idf.yaml +++ b/tests/components/midea/test.esp32-idf.yaml @@ -6,3 +6,10 @@ packages: wifi: ssid: MySSID password: password1 + +# Regression test for https://github.com/esphome/esphome/issues/18054: the +# MideaUART ESP-IDF shims must not make unqualified millis() ambiguous +interval: + - interval: 10s + then: + - lambda: ESP_LOGD("test", "%u", millis());