Ideas for making a flow

I have a main door with a electronic lock with keypad. Currently I’m remodeling and living in the basement. Here i have a simpler Danalock that only sits on the inside. I have 2 flows that mirror the basement lock to whatever the main locks position is. Like sentral locking in a car.
But since moving down I dont allways remember to go and Unlock the main door by code and then go to the basement door.

I have a aquara push button that have 3 input modes that can be used. Single/double click and hold.
Is there a way i could make the button function like a morse code? lets say 2 double clicks and a hold to unlock the basement lock.
I have some experience in PLC programming but Im missing the “or” block and negation in homey advanced flow. My brain cant think of any other way to do this without using said blocks.

Suggestions?

Add a numeric logics card, value = 0. Make it increment with 1, with every button press within a certain amount of time.
A timer of, say, 5s resets it to 0 again, regardless.
When it’s zero, no action.

The changed value of the logics card start flows wich control the lock.

Or something like this

This is achieved by connecting the outputs of all the conditions to the same input of the next card. That way if condition1 OR condition2 is met then the next card will be activated.
You can also connect the outputs to any Any card to make it easier to read.

1 Like

Thanks, Using variables solved my issue. Now i have a set combo on the button within 10 seconds before it resets the variable. And a single press mirrors the Main lock so it saves some battery on it instead of allways locking and unlocking even if we only use the upstair lock.

1 Like