Skip to content

Issues on RC8.5 #356

@Richhoef

Description

@Richhoef

First of all, thanks for your hard work on this very nice project!

Below are the issues I found on RC8.5:

  • The start/end values in the visibility window (in the page settings) aren't saved
  • The device power and refresh settings (and epaper options) aren't saved
  • The hourly widget does not show any values
  • In the designer, when a text box (for example, the date/time box) is made very narrow, but high, the text is shown wrapped, but on my device, the text will still be one line (therefore going wider than the box I set and drawing over other items)
  • The stay_awake_switch is checked twice in deep_sleep_cycle. Once at the top (after which a return out of the script is done) and once at the bottom (after which a retry of the script after 60 seconds is done, although this point will of course never be reached). I think the one at the top should go.
  • It always does “Auto-switching to scheduled page” because of the id(last_page_switch_time) == 0 (and last_page_switch_time being initialized with 0). It isn't really in the way, but looks a bit weird in the log, because there is no switching required.
  • Nothing is done with is_sleep_time in manage_run_and_sleep so that part could go. Same for interval, it is set at the top, but never changed.
  • No long sleep (with sleep until is implemented when sleep_time is active. I think this should be in the deep_sleep_cycle and look something like this (and should be situated inside the "Entering Deep Sleep now..." section):
      - logger.log: "Entering Deep Sleep now..."
      - if:
          condition:
            binary_sensor.is_off: stay_awake_switch
          then:
            - if:
                condition:
                  lambda: |-
                    auto time = id(ha_time).now();
                    if (time.is_valid()) {
                      int hour = time.hour;
                      int start = 23;
                      int end = 7;
                      if (start < end) {
                        if (hour >= start && hour < end) return true; // long sleep time
                      } else if (start > end) {
                        if (hour >= start || hour < end) return true; // long sleep time
                      }
                    }
                    return false; // short sleep time
                then:
                  - logger.log: "It is nighttime, sleep until 07:00."
                  - deep_sleep.enter:
                      id: deep_sleep_control
                      until: "07:00:00"
                      time_id: ha_time
                else:
                  - logger.log: "Daytime, normal cycle"
                  - deep_sleep.enter: deep_sleep_control
          else:
            - logger.log: "Deep Sleep prevented, retrying in 60s"
            - delay: 60s
            - 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