I have a problem with the next flow because the motion sensor ( NEO PIR V2 ) does not restart the counter ( COUNTDOWN APP ) when I am for more then 300 seconds in the room, even when I waving around with my hands. Problem is after timer reaches 0 the light turns off.
IF motion on AND light off THEN stop counter X, turn on light ( HUE PHILIPS )
IF motion off AND light on THEN start counter X for 300 seconds
IF counter X reaches zero AND light on THEN turn off light