KaufHA/PLF12

Cannot Validate base plug yaml

Closed this issue · 1 comments

Using this yaml as my local input:

substitutions:
  name: kauf-plug-7aac6a
  friendly_name: kauf-plug-7aac6a
packages:
  Kauf.PLF12: github://KaufHA/PLF12/kauf-plf12.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

I get the following error

INFO ESPHome 2023.6.5
INFO Reading configuration /config/kauf-plug-7aac6a.yaml...
INFO Detected timezone 'Etc/UTC'
Failed config

binary_sensor.gpio: [source /config/.esphome/packages/a0579e33/kauf-plug.yaml:204]
  platform: gpio
  id: button_in
  name: kauf-plug-7aac6a Button
  pin: 
    number: GPIO3
    mode: 
      input: True
      pullup: True
    inverted: True
  on_press: 
    - lambda: |-
        // store time of press and clear duration sensor
        id(global_press_time) = millis();
        id(sensor_press_duration).publish_state(0);
        
        // toggle if configured for toggle on press
        if (id(select_button).state == "Toggle on Press") {
          id(relay).toggle(); }
    - script.execute: script_do_nothing
    - script.execute: script_30s_timer
  on_release: 
    - lambda: |-
        // set duration sensor
        id(sensor_press_duration).publish_state(millis() - id(global_press_time) + id(number_debounce).state);
        
        // toggle if configured on release and toggle check script is not running.
        if (  (id(select_button).state == "Toggle on Release") && !id(script_force_ap).is_running() ) {
          id(relay).toggle();
        }
    - script.execute: script_do_nothing
    - script.stop: script_30s_timer
  filters: 
    - 
      This option is not templatable!.
      delayed_on: !lambda |-
        return id(number_debounce).state;

This yaml file worked fine when the device was flashed the first time roughly a week ago.

Was running out of date ESPHome. Fixed with updating to 2023.7.0!