I agree with everything, but with one exception:
Krambriw wrote:Enable ID=xxx: enable the egg-timer with ID=xxx and start it right away (if schedule is allowing it...)
I do not see a reasonable way to do it. I think it would not be right to go this route.
After all, the egg-timer to start based on some event. Enabling and start are two entirely different events
and you are suggesting that under some conditions were merged. Where and how to write these conditions?
I think that good rules are:
A) Event X caused the egg-timer with ID=xxx is currently allowed (for example, the beginning of some period)
B) The same event X may initiate a test, whether the egg-timer to run. If yes, egg-timer is started
C) any event at any time can try to start egg-timer. If the egg-timer is enabled, is started. If currently disabled, nothing happens.
I have another dilemma.
There are two possible scenarios, and both have their own logic:
1) The egg-timer with the same ID (= xxx) can be running at one time more than once.
2) The egg-timer can be run only once (currently running the egg-timer with the same ID will be aborted).
I think it makes more sense to use the second scenario
Now, when I finished writing it I thought one solution that might suit your design.
Each egg-timer, in addition to the existing parameters and new parameters, such as a Name (ID) and Status (Enabled/Disabled) has another new parameter.
This parameter should be named as Start immediately at the time of enabling
What name would you have had Actions that perform ON and OFF this parameter?
Alternatively, this parameter should be set only in the GUI?
Best regards, Pako