I think in both of your our examples (simple routine and smart lighting) that if there was never any motion to begin with, it will never turn light off. The counter only starts when motion goes from ON to OFF.
Hmm… possibly so. I’ve only got one motion sensor and if you enter the space it covers, the lights for that space go on. Maybe if I slid my hand carefully around the corner, I could turn the lights on and the not enter the garage… but why would I?
Are you trying to light an area that isn’t “visible” to the motion sensor? Or trying to account for manually turning the light on from a location not visible to the motion sensor?
I’m interested in your scenario. I can’t think of what purpose this would serve, but it’s questions like yours that bring me here. I like learning of new ways to use automation.
In my kitchen I have a light over the sink. It turns on with motion but only after 1. -20min from sunset or 2. Iux falls below 50. Sometimes I want that light on outside of these conditions so I manually turn it on (heaven forbid we use our hands, so I ask Alexa to do it) The light will stay on unless 1. I manually turn it off or 2. One of the above conditions turns true and now motion is controlling the light.
Now, if I want the light to turn off from manually being turns on and I’m outside of those conditions, the only 2 ways I can think of are 1. Using a virtual switch that is activated by another routine outside of my 2 original conditions or 2. If your switch supports reporting of manual presses and you can incorporate that into a routine. But I don’t think many switches do that.
Not sure how to quote/reply… but I have a basement that has 1 switch that controls all the lights in the basement. The kids play down there and the room with the motion detector doesn’t cover alot of the area. They also sometimes switch both the stairs light and the basement light on at the top of the stairs when they are grabbing something FROM the stair landing area (toy bins are kept there). But there is never any motion triggered on the motion sensor in this case. So yes, I need a timer as well as motion stopping.
There are two approaches for the timer here. First, using a virtual momentary button with a defined auto-revert interval which can be used as a trigger to evaluate whether the light is still on and turn it off. Second, would be to use the Edge Counter Utility from @TAustin to count elapsed time and then at some selected value (say 15 mins) then turn off the light.
You can combine one of those options with motion conditions to set up your routine.
You misunderstood. Yes a switch will update it’s state in Smartthings. However there are, or were, switches that could report whether the physical switch was used as opposed to an automation.
My comment was me just thinking out loud trying to figure a reason for the OPs usage and give a possible solution.
There are times I do not want to use Alexa for turning lights on or off. Like when people are sleeping.