Apparent bug with triggered events

I originally set up a rule to set mode to 'jour' (day in French) between two times: sunrise and sunset.

I did some testing, which involved at some point setting an offset of -13h (or -780 minutes) on sunset time.

Finally I decided that using a triggered rule would be a better idea and converted this rule into a triggered rule.

Now the triggered rule has in its settings obsolete data from the previous non-triggered rule that it was converted from. This data is invisible in the rule edit forms, but it is used behind the scene to affect rule behavior.

This morning, I'm in my living room and I see a light that I keep ON during the day coming ON at 7:19. I wondered what could have triggered that event and checked my rules. I see in the rule data that sunset with an offset of -780 minutes is still there (it shouldn't be as I changed my trigger events to a single one: "at 8:00am" after learning that there's a bug related to sunrise), and it just so happens that 7:19 is exactly the sunset time from 3 days ago, minus the offset.

This data is still used to trigger the rule, as can be seen in the list of scheduled jobs. It is invisible in the forms, so the user has no idea that it will be executed.

Here's the data for this rule:

Settings

Name Type Value

actSubTypeTrue.1 enum Set Mode
actTypeTrue.1 enum Set Mode or Global Variables, Push Buttons
atSunriseOffset3 number 0
atSunsetOffset4 number -780
atTime5 time 08:00
cond enum Lock mode is off
ending1 enum Sunset
endSunsetOffset1 number -30
logging bool true
modes2 enum ["3"]
modes3 enum ["1"]
modes4 enum ["33","1","3","2"]
modes5 enum ["4"]
modesX2 enum ["1"]
modeTrue.1 enum 1
origLabel text Jour
rCapab5 enum Mode
rCapab7 enum Switch
rDev7 capability.switch Lock mode
RelrDev6 enum =
starting1 enum Sunrise
startSunriseOffset1 number 0
state7 enum off
tCapab5 enum Certain Time
time1 enum Sunrise
time3 enum Sunrise
time4 enum Sunset
time5 enum A specific time
Event Subscriptions

No Event Subscriptions are set.

Application State

Name Value

actCondNdx -1
actionDone true
actionListTrue [1]
actionsTrue {1={wait=, modes={}, method=getSetMode, cond=0}}
actLabelIndent
actNdx 2
cancelList []
cancelListPend []
capabActDone false
capabDone true
capabsfalse {8.false={}, 7.false=Lock mode is off, 5.false=Mode is Absent}
capabstrue {6.true={}, 5.true=When time is 08:00}
certainTimes []
condOper oper
convertedFromRule true
cstCmds []
editCondIf
eraseRule false
eval [NOT, 5, AND, 7]
firstR true
formerState modeLock
globVars {modeLock={val=false, type=Boolean}, dimLevel={val=100, type=Number}}
hasAll false
hasCondition false
hasDevice
hasElse false
howMany 34
howManyT 3
inIf false
inRepeat false
installedCapabs [Telnet, Polling, HealthCheck, Battery, Outlet, Indicator, Initialize, WaterSensor, SwitchLevel, Switch, ChangeLevel, Configuration, Light, Actuator, Sensor, Refresh]
isExpert false
lastCodes {}
lastEvtDate 05/19/2019
lastEvtName Trigger
lastEvtTime 07:19
lastEvtValue
ndx.false 8
ndx.true 6
paramNdx 1
paramsDone false
parenLev 0
parens 0
private true
repeating {}
ruleType tule
skipIfActionsFalse false
skipIfActionsTrue false
skipRepeatActionsFalse false
skipRepeatActionsTrue false
subscribedVariables []
success true
token 4
varUseList {}
wasEndSR false
Scheduled Jobs

Handler Next Run Time Prev Run Time Status Schedule

allHandlerT 2019-05-20 07:19:00 EDT 2019-05-19 07:19:00 EDT PENDING 0 19 7 * * ?

Now I returned to the rule edit screen and clicked 'done with trigger events' and then 'done with triggered rule'. The data now shows the next scheduled job at the right time (8am tomorrow).

I suspect that after it executes at 8am tomorrow, the next trigger time might be set to 7:19am again. We'll see. In any event, something is wrong when the data we enter and see displayed is not the data used to trigger events...