Hello, I currently have two automations in my bathroom: 1 to turn the lights on via motion detection, and another to turn the lights off after 5mins of inactivity. The first automation works flawlessly, however, the second does not. The automation log says it runs when it’s supposed to, but nothing happens. If I run it from the automations list it works fine. Please see the code below. Where am I going wrong? TIA!