Skip to content

RC8.3 cannot compile #339

@greytuk

Description

@greytuk

Just tried RC8.3 and had a couple of compilation issues. First is below

Compiling .pioenvs/photopainterv2/cxx/cxx_guards.cpp.o
/config/esphome/photopainterv2.yaml: In lambda function:
/config/esphome/photopainterv2.yaml:655:15: error: 'is_sleep_time' was not declared in this scope
655 | lambda: 'return !is_sleep_time;'
| ^~~~~~~~~~~~~
Compiling .pioenvs/photopainterv2/cxx/cxx_init.cpp.o
Archiving .pioenvs/photopainterv2/esp-idf/cxx/libcxx.a
Indexing .pioenvs/photopainterv2/esp-idf/cxx/libcxx.a
Compiling .pioenvs/photopainterv2/driver/deprecated/adc_legacy.c.o
Compiling .pioenvs/photopainterv2/driver/deprecated/adc_dma_legacy.c.o
*** [.pioenvs/photopainterv2/src/main.cpp.o] Error 1

This is associated to the YAML generated below

  • id: manage_run_and_sleep
    mode: restart
    then:
    - logger.log: "Waiting for sync..."
    - wait_until:
    condition:
    lambda: 'return id(ha_time).now().is_valid() && api_is_connected();'
    timeout: 120s
    - delay: 5s
    - lambda: |-
    int interval = id(page_refresh_default_s);
    bool is_sleep_time = false;
    auto time = id(ha_time).now();
    if (time.is_valid()) {
    int hour = time.hour;
    int start = 0;
    int end = 8;
    if (start < end) {
    if (hour >= start && hour < end) is_sleep_time = true;
    } else if (start > end) {
    if (hour >= start || hour < end) is_sleep_time = true;
    }
    }
    id(page_refresh_current_s) = interval;
    - if:
    condition:
    lambda: 'return !is_sleep_time;'
    then:
    - component.update: epaper_display
    else:
    - logger.log: "Night-time sleep active, skipping display update."
    - script.execute: deep_sleep_cycle

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