Guys, I’d need a little help with designing a piston for automating my kitchen light:
1) Give a description of the problem
I have two motion sensors in my kitchen, one directing outside of the kitchen door (let’s call it motion1), one inside the kitchen (motion2). The idea is that the kitchen light switches on when someone approaches the kitchen door (motion1 fires), so that the light is on when entering the kitchen (and we don’t have a delay). I now want a piston that switches off the light again when motion2 doesn’t fire within 10 to 15 seconds after motion1 - that would indicate that someone passed the kitchen door, but did not actually enter the kitchen (usually my dog :-)). Only if motion2 is active or has become active 10 to 15 seconds after motion1, should the light stay on.
2) What is the expected behaviour?
In short:
- make “motion1 change to active” turn on the light - easy as cake
- switch off the light if after 10-15 seconds motion2 did NOT change to active
3) What is happening/not happening?
I have experimented with “wait”, but this only worked unreliably and somehow messed up the automation. I have experimented with different conditions and triggers for motion2 to switch off the light, but that also didn’t lead to the wanted behavior.
I have the impression that the solution should be super simple and obvious, but I don’t find the correct logic for it.
thanks a lot in advance for your input!