-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
backburnerlow priority compared to other issueslow priority compared to other issuesenhancementwontfix
Description
WLED checks every minute for a matching time-controlled preset.
However, I don't leave my LED strip turned on 24/7.
For example, if I set a timer at 6pm, but only power up the LED strip at say 6.30pm, the LED strip will not turn on until the next night, when I really would like it to turn on immediately.
I would like to suggest adding an option in the GUI:

And modifying checkTimers() like so:
void checkTimers()
{
if (lastTimerMinute != minute(localTime)) //only check once a new minute begins
{
lastTimerMinute = minute(localTime);
int time_delta = 1440; // minutes in a day
int16_t nextPreset = currentPreset;
for (uint8_t i = 0; i < 8; i++)
{
if (timerMacro[i] != 0
&& (timerWeekday[i] & 0x01) //timer is enabled
&& timerWeekday[i] >> weekdayMondayFirst() & 0x01 //timer should activate at current day of week
&& (timerHours[i] <= hour(localTime))
&& ((60*(hour(localTime) - timerHours[i]) + minute(localTime) - timerMinutes[i]) <= time_delta) // find the most recent timer compared to localTime
)
{
time_delta = 60*(hour(localTime) - timerHours[i]) + minute(localTime) - timerMinutes[i];
nextPreset = timerMacro[i];
}
}
if (nextPreset != currentPreset) applyPreset(nextPreset);
}
}
I would take a stab at it, except I'm still on v0.12.0 and the main branch doesn't work for me.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backburnerlow priority compared to other issueslow priority compared to other issuesenhancementwontfix