Motion or presence sensor.
I specifically would not go down that path because the motion sensor can turn off the lights automatically and most presence sensors require constant power to work and are expensive. I am getting around this limitation at my house, where we keep the bathroom door open when it is not in use, by not allowing the light to turn off in the bathroom when the door is closed but allowing it to turn off when the door is opened, using conditional logic in our automations. And to trigger the automation, we use the motion sensor not detecting motion.
Mine was like $10. Works flawlessly. Can be switched from motion sensing to occupancy.
Just say it’s the bathroom 😉
Both of the rooms where this would be useful that I know of are bathrooms. In the office area of my school, they keep the bathroom doors closed. And at my grandfather’s house, one of the bathrooms was stupidly designed so that the doors (one in the hallway and one in the Guest Bedroom) open to the outside instead of the inside. This means that the doors are in the way and cannot be kept open when the bathroom is not in use. Nonetheless, this will work in any room where the door is primarily kept closed. Some ideas could be a large walk-in closet turned into an office if the door swung out of the closet or if you had stuff behind the door, a room that you need to keep the door closed in for whatever reason, or for a different situation. I don’t think that this is an extremely large issue for Automators, as there is a pretty small subset of people who have this issue, but I would guess that it is sort of common.
What’s the ‘here’? Is there meant to be a link?
I would t use smart. Just a basic occupancy switch.