Figure out clocking relay

Here are all the states that can occur, I put them in the table below.
From an abstract perspective I can follow your thinking, but it’s too long ago for me to write a piece of code in openhab.
Hope, you can give me some skeleton to proceed with :slight_smile:

file

For my washing machine, following hint was helpful, but this seems to be the easier option to argue with mA-values, because timing seems to be quite challenging.