Hubitat C-7 ver 2.2.8.138
I have some basic rules that run based on time restrictions. I've reported another issue previously based on sunrise/sunset offset that was resolved. This is a new issue that I just realized has been going on for a while, but only just put it together as to what was happening. I created a test rule as a POC that seems to confirm it.
The problem is that when I turn on a light by motion then wait for a certian amount of time, the rule does not complete if that wait time is beyond the end time for the rule. I would expect this rule to complete after the elapsed time.
The test rule I created looks like this. On motion turn on the light. After 20 minutes, turn the light off. I set a time restriction from 11:00am until 11:10am, thus ensuring the time delay overran the restriction. The motion sensor last triggered the light at 11:06am and manually turned the light off about 11:45am, well after the expected 20 minute wait time to turn it off.
The logs are as follows:
app:1912021-07-22 11:06:37.226 am infoact: Wait Until elapsed time of 20 minutes has passed
app:1912021-07-22 11:06:37.201 am infoact: Turn on Office White Ecosmart Light
app:1912021-07-22 11:06:37.196 am infoevt: Office Motion Sensor motion active
app:1912021-07-22 11:02:11.989 am infoact: Wait Until elapsed time of 20 minutes has passed
app:1912021-07-22 11:02:11.912 am infoact: Turn on Office White Ecosmart Light
app:1912021-07-22 11:02:11.906 am infoevt: Office Motion Sensor motion active
app:1912021-07-22 10:57:29.865 am infoapp: When Office Motion Sensor activates …
app:1912021-07-22 10:57:29.863 am infoapp: initialized
app:1912021-07-22 10:44:45.064 am infoapp: When Office Motion Sensor activates …
A complication that exists is in my 'real' rules I have the same devices trigger differently after one set of rules ends at 10pm and the next starts at 10pm and runs until sunrise. A motion sensor and lights are 100% from sunset -50 to 10pm. These same devices from 10pm until sunrise come on at 30% on motion.
I get if this is a 'working as expected' thing. If that is the case, how do I work around this to make sure that, in this case, the lights are indeed turned off after 20 minutes even if its beyond the time restriction? Something like a 'Ensure this rule completes beyond the time restriction' option?
CC: @bobbyD