Delay issue to do with midnight?

I have a simple rule in rule machine that detects when a virtual switch is turned on (by alexa) that waits twenty minutes then sets the mode to night (that separately triggers loads of things to turn off)

It works perfectly, except if you trigger it just after midnight, when you don't get twenty minutes.

Is it to do with the time being measured not in absolute but using relative to the day time?

I would recommend taking a screenshot of the rule and posting that so that people can see exactly how it's set up.

Here you go...

Is the switch used in any other rules? You can check this by looking at the In Use By section at the bottom of the Device page. I am wondering if anything else may be affecting the state of the switch around midnight. From the Device page you could also check the Events for the device, available from a button at the top of the Device page for the Virtual Switch.

No it's only used to trigger night mode... Its linked to an alexa routine for goodnight.

It's definitely something to do with crossing the midnight boundary in the time calculation used by rm... Pretty certain about that.

For the rule switch on all logging (events, triggers, actions). Post a screenshot of the logs filtered to the rule when triggered after midnight (IE when it omits the 20 minute 'and stays' part of the rule)

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.