I was testing out the different versions of the yaml files that you have provided and I am unable to compile with kauf-plug-lite.yaml. My system is using ESPHome v2022.12.1 that was released today.
I get the following error:
Compiling .pioenvs/kauf-plug-0ad993/src/main.cpp.o
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml: In lambda function:
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml:722:39: error: 'GPIO_SWITCH_RESTORE_DEFAULT_OFF' is not a member of 'esphome::gpio'
722 | relay->set_restore_mode(gpio::GPIO_SWITCH_RESTORE_DEFAULT_OFF);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml:724:39: error: 'GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_OFF' is not a member of 'esphome::gpio'
724 | relay->set_restore_mode(gpio::GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_OFF);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml:726:39: error: 'GPIO_SWITCH_ALWAYS_ON' is not a member of 'esphome::gpio'
726 | relay->set_restore_mode(gpio::GPIO_SWITCH_ALWAYS_ON);
| ^~~~~~~~~~~~~~~~~~~~~
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml:728:39: error: 'GPIO_SWITCH_ALWAYS_OFF' is not a member of 'esphome::gpio'
728 | relay->set_restore_mode(gpio::GPIO_SWITCH_ALWAYS_OFF);
| ^~~~~~~~~~~~~~~~~~~~~~
/config/.esphome/packages/a0579e33/kauf-plug-lite.yaml:730:39: error: 'GPIO_SWITCH_RESTORE_DEFAULT_ON' is not a member of 'esphome::gpio'
730 | relay->set_restore_mode(gpio::GPIO_SWITCH_$sub_restore_mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** [.pioenvs/kauf-plug-0ad993/src/main.cpp.o] Error 1
I was testing out the different versions of the yaml files that you have provided and I am unable to compile with kauf-plug-lite.yaml. My system is using ESPHome v2022.12.1 that was released today.
I get the following error:
This seems to have changed in: https://github.com/esphome/esphome/commit/c55e01ff3f0f1b62cf1cea0612867f0c2453c3ee if I am reading the code correctly.
I can use kauf-plug.yaml, so there is no rush getting this fixed. Thanks!