Skip to content

YAML Validator errors for athom-smart-plug-v2.yaml #142

Description

@MasterCATZ

Error : unknown tag !<!lambda> at line 60, column 9:
- lambda: |-
^
Line : undefined undefined

you might want to look at that

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"
  comment: "${device_description}"
  area: "${room}"
  name_add_mac_suffix: true
  min_version: 2024.6.0
  project:
    name: "${project_name}"
    version: "${project_version}"
  platformio_options:
    board_upload.flash_size: 2MB
    board_upload.maximum_size: 2097152
    board_build.ldscript: eagle.flash.2m.ld
  on_boot:
    - priority: 600
      then:
        - select.set_index:
            id: power_mode
            index: !lambda |-
                    return id(restore_mode)-1;
        - lambda: |-
              switch(id(restore_mode))
              {
              case 1:{
                      id(relay).turn_off();
                      break;
                            }
              case 2:{
                      id(relay).turn_on();
                      break;
                            }
              default:{
                      break;
                            }
              }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions