I've been using this external component and everything has been working great up until I updated Home Assistant and ESPHome recently.
Since the update, compiling any ESPHome configurations that included this external component has failed with multiple errors like the following:
Compiling .pioenvs/studio-heat-pump/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
In file included from src/esphome.h:24,
from src/esphome/components/mitsubishi_heatpump/espmhp.h:20,
from src/esphome/components/mitsubishi_heatpump/espmhp.cpp:21:
src/esphome/components/mitsubishi_heatpump/espmhp.h:163:14: error: 'optional' in namespace 'std' does not name a template type
std::optional<std::chrono::duration<long long, std::ratio<60>>> remote_operating_timeout_;
^~~~~~~~
src/esphome/components/mitsubishi_heatpump/espmhp.h:163:9: note: 'std::optional' is only available from C++17 onwards
std::optional<std::chrono::duration<long long, std::ratio<60>>> remote_operating_timeout_;
^~~
Followed by a bunch of error: '<VARIABLE>' was not declared in this scope messages.
I'm not exactly sure what change caused this, but I was able to resolve it by switching to C++17. In my ESPHome configuration I added the following:
I've been using this external component and everything has been working great up until I updated Home Assistant and ESPHome recently.
Since the update, compiling any ESPHome configurations that included this external component has failed with multiple errors like the following:
Followed by a bunch of
error: '<VARIABLE>' was not declared in this scope
messages.I'm not exactly sure what change caused this, but I was able to resolve it by switching to C++17. In my ESPHome configuration I added the following:
This disables the
std=gnu++11
flag and enables thestd=gnu++17
flag in PlatformIO.