KaufHA/PLF10

Unable to compile kauf-plug-lite.yaml

Closed this issue · 1 comments

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

This seems to have changed in: esphome/esphome@c55e01f if I am reading the code correctly.

I can use kauf-plug.yaml, so there is no rush getting this fixed. Thanks!

Thanks for letting me know. I made the change in the main yaml and it slipped my mind that I needed to do the same thing in the lite. Just fixed it.