Hi
I’d appreciate a nudge in the right direction please. I have an open/close sensor on my cat flap and a virtual presence sensor for the cat. I use cat flap opening to toggle whether the cat is at home or not.
The problem I have is that sometimes the flap swings right throughout ugh when closing (ie open -> closed -> open -> closed) and so the cat presence would change to away and then home straight away. Sometimes he paws at it as well before going through so there might be a number of activations.
What I think I want is:
If cat flap changes to open then
- toggle cat presence status
- time period of 30s during which opening cat flap does not trigger piston
I’ve tried using wait 30s after changing the presence status but opening th cat flap during that time still changes presence status.
I tried pausing the piston, then having a wait 30s, then resume piston. That prevents a second toggle but the piston never reactivates, presumably because it’s paused so can’t set itself to resume.
Is there an elegant way to do this without having two pistons.
Thanks for any advice
Andrew