I can not figure out how I can solve the following:
I have 3 Motion sensors. I want to have an information in my UI, that is “ON” when one of these motion sensors have been triggered within the last 15 Minutes.
I thought of solving it like a motion activated light. Unfortunately, I can not wrap my head around, if and how I create a sensor for that “virtual” light.
Anyways, I am not sure if I am on the right track.
Any ideas? Any examples?
Oliver
P.s. It is amazing to see, how much the project has grown …
The tricky part is the “triggered in the last 15 minutes” since there’s no built in attribute for that. Last Changed and Last Updated will get set on a restart as the device is initializing so that would cause a false positive. If you don’t mind that then you could write a template sensor that analyzes the Last Changed or Updated from all three sensors to see if it’s been in the last 15 minutes - but that would also produce a result when they changed from ON to OFF as well, so again a false positive.
You could set up a helper toggle that you set via automation whose trigger is when any of the sensors go from OFF to ON with a delay to turn off the helper toggle after 15 minutes but with the automation set as a restart so that if any of the other two trigger that the helper stays as ON for another 15 minutes.
You could do all of this in a template sensor as well, but the UI offers a pretty easy way to do it without coding.
"helper toggle ". That was my missing part of the puzzle Works like a charm. Created a automation that is triggered by the motion. This switches the helper on for 15 minutes