Basically you see me slamming the door of the washing machine on the left, and then intermittently and at the end some heavy vibrations due to the spinning.
What I did was the following:
Create a history stats sensor counting the amount of ‘vibration’ events from the Xiaomi sensor in the last 15min, which gives me this:
Create a boolean ‘washing machine is running’
I fire an automation when the count of the history stats sensor is above 4, if the boolean is set to off. Actions are turning on the boolean (so I only fire the automation once), delay of 15 min (after the spinning it’s a couple more minutes before the machine is finished), then I push a notification to my phone and turn the boolean off again.
I had a couple of dry runs checking if the pattern is more or less the same every time, it works really well
@denis.besir, you can change the sensitivity of your vibration sensor through the Xiaomi Gateway, and you can probably do it through other gateways as well. I did this and I managed to get mine working, but I used NodeRed instead.
The machine typically does quite a bit of high speed cycling which causes the vibration sensor to trigger a lot, I played around with the counter a bit to figure out the right threshold so it doesn’t prematurely think the machine is almost finished during a mid-program spin-up.
I guess it depends a bit from washing machine to washing machine, best way to figure it out is to put the counter in the HA recorder and keep track of it for several runs of a program and find a pattern.
For anyone looking on how to do this with Aqara/Xiaomi vibration sensor…
The sensor can not sense the long vibration, it just gives a discreet vibration event and then resets and then a minute later gives another one and so on.
looking at the trigger pattern when it is attached can give you a good idea on how many events you need to count within a timeframe.
I haven’t found this post, I used Statistics sensor solution from this post
They both do a similar thing, choose what to play with.