Custom Vacancy Sensor with echo - is there a better way


#1

1) Give a description of the problem
This works but it seems like there is a more efficient way

2) What is the expected behaviour?
turns off the light if its on for x minutes and there is no motion (and tells w/ Echo Speak that its being turned off)

3) What is happening/not happening?
works just hoping for suggestion to make simpler

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

This switch is a Smart wall switch and turn On/Off dumb light bulb right?
And entry has a single motion sensor…

You want lights to turn OFF if there is no motion for 40 seconds, am I correct?


#3

I would reduce to a single trigger, and drop the WHILE. Maybe something like this:

IF Sensor 4's motion stays inactive for 60 sec  <-- Trigger
and
Switch 2 is on                                  <-- Condition
Then
    Speak text
    Turn off Switch 2
END IF

#4

yes yes yes


#5

OMG…now THAT is simple!


#6

sp36619013_sc7


#7

@wcmore beat me to it:)))

Hey man @WCmore go away… don’t you have a piston to write or something something… :sweat_smile::joy::rofl::joy::rofl:


#8

OK OK, I can take a hint, LOL