I recently had a few broken rules where I tried to wait for inactivity for 5 mins before I turn off the lights. The rule seemed to have created an invalid "waitingStay" field and thus never triggers the second check of the status.
Is this a known issue? It can be fixed by deleting and recreating the rule but it's a bit annoying having to do so every time it breaks.
Have tried to edit the rule, to fix the time? Seems like corruption of some sort.
Removing and re-adding worked, yet I think this points to some implementation issue in the code and I think it's worth asking an engineer to looking into this. This probably should be a piece of immutable data yet for some reason it could get corrupted under certain circumstances. Checking if the code ever mutates it or if any database transactions were not atomic should find the root cause.
This corruption happens outside of the app; it's not something addressable within the app.
That's interesting! Do you mean "Application State" under the /installedapp/status/ page (Show app details and settings) is not part of the app? If it's outside the app, why would removing and re-adding the rule fix the problem?
Application state is part of the app. Your theory about immutable data does not apply. Show the rule in question.
Incidentally, waitingStayNow is an epoch time value, and the one you show above is valid. So I was probably wrong about corruption. Need to see the rule to know what is happening or not. Logs would be good as well, with Event, Trigger and Action logs all on.
Thank you @bravenel I'll report back if I see it again!