I have a question I am fairly new to home assistant I would like to have at 11 o’clock when someone walks through the hallway the hallway light come on for 10 seconds and the hall light but the hall light does not have to go off after 10 seconds if someone goes back to bed so walks past the sensor again then the hallway lights come on again and all the lights go off at the same time after 10 seconds how do I arrange this I do not want to do this in yaml I would like to do this in visual code thank you in advance if someone can help me with this
What have you tried that the official documentation didn’t explain satisfactorily?
It’s still a YAML file that you’d be editing in sisual code studio. Have you tried the UI automation creater? It’s really quite straight forward.
Hello jelaboske,
What have you done so far? How to help us help you - or How to ask a good question
I’m sure that can be done. Also having someone or something writing it for you means the second it misbehaves, you will be struggling back to find someone to fix it for you.
The best way to learn is to just try. Run thru the docs on getting started with the automation editor. If you get stuck, come back with what you have done.
Understanding automations - Home Assistant
and
The Home Assistant Cookbook - Index.
Unless you have a really impressive sensor setup**, I am not sure you will be able to tell the difference between the first person going back to bed and a second person leaving the bedroom.
** - In which case we would need more details on the sensor setup.
Additionally I am not sure your timeouts are realistic - I will admit I only have basic sensors, but the lowest reset/clear time I can set on mine is 15 seconds - hence the sensors won’t re-trigger before going to clear and re-detecting.
Do you mean exactly at 23:00:00.000 or after 23:00?
They mean very different things in automation and programming.
And when does this end? at 00:00? When do you not want the light to come on for 10 seconds?
And I’m not trying to be a jerk or anything, but 110 words in one sentence is hard to read.
Try and break it up so that it’s easier to read.
If you’re new start with something way simpler.
What you’re asking can probably be done but it’s going to be pretty complicated. It’s even complicated to describe so trying to code that is going to be pretty near impossible just starting out.