I used this automation before without the mod and had issues of it not sensing motion after 5s. I did the mod now and applied this automation. These together seem to work! I did the mod today, but noticed the lux levels refreshed every 5s, but the motion state not. I saw your comment and applied this automation as well and now it seems to work. After 5s the motion stops and I can trigger it straight away 
Gonna keep testing to make sure it actually works properly.