DomiStyle / esphome-panasonic-ac

Open source alternative for Panasonic air condition wifi adapters that works locally without the Comfort Cloud
MIT License
226 stars 58 forks source link

Failing to compile #64

Closed Mark-Longley closed 2 years ago

Mark-Longley commented 2 years ago

Hi, I have 2 Panasonic units working in HA and have never had any issues previously. I added a total daily energy meter and tried to install to the ESP, but it failed to compile. I’ve tried reinstalling on my other ESP with the original unchanged configuration and I get the same errors. I am running the latest version of Home assistant with all current updates.

Any guidance would be much appreciated Thanks

INFO Reading configuration /config/esphome/master-bed-ac.yaml... INFO Generating C++ source... INFO Compiling app... Processing master-bed-ac (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf Dependency Graph |-- 1.2.2 |-- 1.0 |-- 1.0 |-- 1.0 |-- 2.1.0 | |-- 1.2.2 |-- 1.1.0 |-- 1.0 Compiling /data/master-bed-ac/.pioenvs/master-bed-ac/src/esphome/components/panasonic_ac/esppac.cpp.o Compiling /data/master-bed-ac/.pioenvs/master-bed-ac/src/main.cpp.o src/esphome/components/panasonic_ac/esppac.cpp: In member function 'void esphome::panasonic_ac::PanasonicAC::set_vertical_swing_select(esphome::select::Select)': src/esphome/components/panasonic_ac/esppac.cpp:187:4: error: no matching function for call to 'esphome::select::Select::add_on_state_callback(esphome::panasonic_ac::PanasonicAC::set_vertical_swing_select(esphome::select::Select)::<lambda(const string&, size_t)>)' }); ^ In file included from src/esphome/components/panasonic_ac/esppac.h:4:0, from src/esphome/components/panasonic_ac/esppac.cpp:1: src/esphome/components/select/select.h:60:8: note: candidate: void esphome::select::Select::add_on_state_callback(std::function<void(std::cxx11::basic_string)>&&) void add_on_state_callback(std::function<void(std::string)> &&callback); ^ src/esphome/components/select/select.h:60:8: note: no known conversion for argument 1 from 'esphome::panasonic_ac::PanasonicAC::set_vertical_swing_select(esphome::select::Select)::<lambda(const string&, size_t)>' to 'std::function<void(std::__cxx11::basic_string)>&&' src/esphome/components/panasonic_ac/esppac.cpp: In member function 'void esphome::panasonic_ac::PanasonicAC::set_horizontal_swing_select(esphome::select::Select)': src/esphome/components/panasonic_ac/esppac.cpp:196:4: error: no matching function for call to 'esphome::select::Select::add_on_state_callback(esphome::panasonic_ac::PanasonicAC::set_horizontal_swing_select(esphome::select::Select)::<lambda(const string&, size_t)>)' }); ^ In file included from src/esphome/components/panasonic_ac/esppac.h:4:0, from src/esphome/components/panasonic_ac/esppac.cpp:1: src/esphome/components/select/select.h:60:8: note: candidate: void esphome::select::Select::add_on_state_callback(std::function<void(std::__cxx11::basic_string)>&&) void add_on_state_callback(std::function<void(std::string)> &&callback); ^ src/esphome/components/select/select.h:60:8: note: no known conversion for argument 1 from 'esphome::panasonic_ac::PanasonicAC::set_horizontal_swing_select(esphome::select::Select)::<lambda(const string&, size_t)>' to 'std::function<void(std::cxx11::basic_string)>&&' *** [/data/master-bed-ac/.pioenvs/master-bed-ac/src/esphome/components/panasonic_ac/esppac.cpp.o] Error 1 ========================== [FAILED] Took 2.67 seconds ==========================

DomiStyle commented 2 years ago

Can you try updating your ESPHome version?

Mark-Longley commented 2 years ago

I’m running the home assistant add on, it’s not showing any updates available. I have a Version v2022.3.1

DomiStyle commented 2 years ago

The current version is v2022.6.2.

v2022.5.0 is the minimum required version for this component.

Mark-Longley commented 2 years ago

Ah ok I’ll have to try and update it. Not sure why it’s not showing any updates in HA. Appreciate the help, Many Thanks!!

Mark-Longley commented 2 years ago

In-install re-install (off and on again) up to date and all sorted. Awesome! Thanks Again