Hi everyone
I have a 4CHPRO R2, and I like to use this project, but installing it via esphome keeps failing, I got this error, please any help is welcome.
PS: I am using the irrigation.h and irrigation.yaml and other files in common dir from {brianhanifin] GitHub
src/main.cpp: In function ‘void setup()’:
src/main.cpp:597:66: error: reference to ‘optional’ is ambiguous
597 | sensor_lambdafilter = new sensor::LambdaFilter([=](float x) → optional {
| ^~~~~~~~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/node_handle.h:39,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/hashtable.h:37,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/unordered_map:46,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/functional:61,
from src/esphome/core/component.h:4,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/optional:60:11: note: candidates are: ‘template class std::optional’
60 | class optional;
| ^~~~~~~~
In file included from src/esphome/core/component.h:7,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/optional.h:36:28: note: ‘template class esphome::optional’
36 | template class optional { // NOLINT
| ^~~~~~~~
src/main.cpp:597:74: error: expected ‘{’ before ‘<’ token
597 | sensor_lambdafilter = new sensor::LambdaFilter([=](float x) → optional {
| ^
src/main.cpp:597:75: error: expected primary-expression before ‘float’
597 | sensor_lambdafilter = new sensor::LambdaFilter([=](float x) → optional {
| ^~~~~
/config/esphome/irrigation.yaml:559:47: error: reference to ‘optional’ is ambiguous
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/node_handle.h:39,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/hashtable.h:37,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/unordered_map:46,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/functional:61,
from src/esphome/core/component.h:4,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/optional:60:11: note: candidates are: ‘template class std::optional’
60 | class optional;
| ^~~~~~~~
In file included from src/esphome/core/component.h:7,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/optional.h:36:28: note: ‘template class esphome::optional’
36 | template class optional { // NOLINT
| ^~~~~~~~
/config/esphome/irrigation.yaml:559:55: error: expected ‘{’ before ‘<’ token
/config/esphome/irrigation.yaml:559:56: error: expected primary-expression before ‘bool’
/config/esphome/irrigation.yaml:273:47: error: reference to ‘optional’ is ambiguous
273 | lambda: return id(relay2).state;
| ^
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/node_handle.h:39,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/hashtable.h:37,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/unordered_map:46,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/functional:61,
from src/esphome/core/component.h:4,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/optional:60:11: note: candidates are: ‘template class std::optional’
60 | class optional;
| ^~~~~~~~
In file included from src/esphome/core/component.h:7,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/optional.h:36:28: note: ‘template class esphome::optional’
36 | template class optional { // NOLINT
| ^~~~~~~~
/config/esphome/irrigation.yaml:273:55: error: expected ‘{’ before ‘<’ token
273 | lambda: return id(relay2).state;
| ^
/config/esphome/irrigation.yaml:273:56: error: expected primary-expression before ‘bool’
273 | lambda: return id(relay2).state;
| ^
/config/esphome/irrigation.yaml:235:53: error: reference to ‘optional’ is ambiguous
235 | unit_of_measurement: minutes
| ^
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/node_handle.h:39,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/hashtable.h:37,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/unordered_map:46,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/functional:61,
from src/esphome/core/component.h:4,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/optional:60:11: note: candidates are: ‘template class std::optional’
60 | class optional;
| ^~~~~~~~
In file included from src/esphome/core/component.h:7,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/optional.h:36:28: note: ‘template class esphome::optional’
36 | template class optional { // NOLINT
| ^~~~~~~~
/config/esphome/irrigatie.yaml:235:61: error: expected ‘{’ before ‘<’ token
235 | unit_of_measurement: minutes
| ^
/config/esphome/irrigatie.yaml:235:62: error: expected primary-expression before ‘float’
235 | unit_of_measurement: minutes
| ^
/config/esphome/irrigation.yaml:250:53: error: reference to ‘optional’ is ambiguous
250 | - platform: restart
| ^
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/node_handle.h:39,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/hashtable.h:37,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/unordered_map:46,
from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/functional:61,
from src/esphome/core/component.h:4,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/optional:60:11: note: candidates are: ‘template class std::optional’
60 | class optional;
| ^~~~~~~~
In file included from src/esphome/core/component.h:7,
from src/esphome/components/api/api_connection.h:3,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/optional.h:36:28: note: ‘template class esphome::optional’
36 | template class optional { // NOLINT
| ^~~~~~~~
/config/esphome/irrigation.yaml:250:61: error: expected ‘{’ before ‘<’ token
250 | - platform: restart
| ^
/config/esphome/irrigation.yaml:250:62: error: expected primary-expression before ‘float’
250 | - platform: restart
| ^
Compiling /data/irrigation/.pioenvs/irrigation/lib67b/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling /data/irrigation/.pioenvs/irrigation/lib67b/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling /data/irrigation/.pioenvs/irrigation/lib67b/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o
*** [/data/irrigation/.pioenvs/irrigation/src/main.cpp.o] Error 1
========================= [FAILED] Took 37.32 seconds =========================