Closed popy2k14 closed 4 months ago
Wait a minute until the lifetime is over and "on_empty_queue" is not triggered.
Night mode simply skips this screen and does not take it into account and does not count its lifetime, but since it is there, then the queue is not empty. According to the log, it looks like this screen is not allowed for night mode, so it just quickly spins into emptiness.
Got you. So a new trigger like "on_empty_queue_night_mode" would be a solution?
If i do not take this into account my screen will be empty in night mode.
With such a new trigger, i can react an fill thje queue again.
So a new trigger like "on_empty_queue_night_mode" would be a solution?
It seems to me that it is superfluous, we need to find where to view the queue and assess whether it is over or not. I'll try, but I don't promise.
thx for looking into it. As state i am using a workaround now, so take your time :-)
It looks like I found the reason, but I'm not sure.
The night mode loop and missing "on_empty_queue" trigger is sadly not working with your fix.
But please set the initial brightness not to 255 (= full blast)! You have set both to 255, so it will dim down from full blast rather than dim up (which i think is better, especially when you have the clock in your sleeping room :-)
So please set it to
uint8_t brightness_ = 0;
uint8_t target_brightness_;
PS.: targetbrightness will be initialized from the pathon CONF variable, so no need to set. But when you want to be sure they are initialized also when there is an python CONF parsing change, please set it to:
uint8_t brightness_ = 0;
uint8_t target_brightness_ = 0;
thx
The night mode loop and missing "on_empty_queue" trigger is sadly not working with your fix.
Any log?
PR updated ...
@andrewjswan @lubeda Tested your new PR (tag: 2024.4.1) and it's working as expected. closing this now thx
Bug report
Describe the bug
I am using:
night_mode_screens: [2,16]
and when ill add an clock screen with 1 minute lifetime:
after boot trigger night mode within 1 minute:
Wait a minute until the lifetime is over and "on_empty_queue" is not triggered.
As a workarounf i am using clock lifetime of 1440 minutes and setting it again in an intervall of 720 minutes.
But the bad thing, it loops really fast:
[13:30:12][D][EHMTXv2:1079]: remove expired queue element: slot 0: mode: 2 icon_name: text: [13:30:12][D][EHMTXv2:1013]: oldest queue element is first: 0/2 [13:30:12][D][EHMTXv2:095]: empty slot [13:30:12][D][EHMTXv2:1261]: on_next_screen trigger [13:30:12][D][EHMTXv2:1164]: no screen to draw! [13:30:12][D][EHMTXv2:1013]: oldest queue element is first: 0/2 [13:30:12][D][EHMTXv2:095]: empty slot [13:30:12][D][EHMTXv2:1261]: on_next_screen trigger [13:30:12][D][EHMTXv2:1164]: no screen to draw! [13:30:12][D][EHMTXv2:1013]: oldest queue element is first: 0/2 [13:30:12][D][EHMTXv2:095]: empty slot [13:30:12][D][EHMTXv2:1261]: on_next_screen trigger [13:30:12][D][EHMTXv2:1164]: no screen to draw! [13:30:12][D][EHMTXv2:1013]: oldest queue element is first: 0/2 [13:30:12][D][EHMTXv2:095]: empty slot [13:30:12][D][EHMTXv2:1261]: on_next_screen trigger [13:30:12][D][EHMTXv2:1164]: no screen to draw! [13:30:12][D][EHMTXv2:1013]: oldest queue element is first: 0/2 [13:30:12][D][EHMTXv2:095]: empty slot
Additional information
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Configuration
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Services calls