I’m currently exploring smart lighting solutions to enhance my home’s security and convenience. One feature I’m particularly interested in is setting up motion-activated lights, such as in my kitchen, to turn on when motion is detected and off after a period of inactivity, say 5 minutes. However, I’ve encountered an interesting challenge: I want these lights to remain on if I manually turn them on, even after the motion has stopped. This seems like a common use case, but I’m curious about the best way to achieve this without relying on external rules engines like CoRE or RM for local control.I’ve been reading through various forums and documentation, and it seems that SmartLighting offers a promising solution for local control. The idea is to create a rule where the light remains on if the switch is manually toggled. I’ve considered using a boolean variable to track the manual state, but I’d like to keep things as simple as possible without complicating the setup.Here’s a rough outline of what I’m thinking:1. Motion Sensor Integration: Use a reliable motion sensor to detect activity in the kitchen area.2. Light Automation: Configure the lights to turn on when motion is detected and off after 5 minutes of inactivity.3. Manual Override: Implement a mechanism where manually turning the lights on bypasses the automation, keeping them on until manually turned off.I’ve come across some discussions suggesting that this can be achieved by linking the light switch to a scene or group item that overrides the automation when manually toggled. However, I’m not entirely sure how to structure this within the SmartLighting framework.I’d love to hear from others who’ve successfully implemented similar setups. What’s the most straightforward way to achieve this? Are there any potential pitfalls or best practices I should be aware of? Your insights would be invaluable as I continue to refine my smart lighting configuration.