Hey everyone! I’ve been working on a fun project to automate my laundry routine using my Xiaomi vibration sensor. The goal is to get a notification when my dryer finishes, so I don’t have to keep checking on it. Here’s how I approached it and some tips for anyone looking to do something similar!
First, I set up the Xiaomi vibration sensor near my dryer. The sensor detects movement, so when the dryer starts, it triggers a vibration. The tricky part was figuring out how to detect when the vibration stops, indicating the dryer has finished. I did some research and found that using a state machine with delays works best to avoid false triggers.
Here’s a quick breakdown of the steps I took:
- Sensor Setup: Placed the sensor securely near the dryer to capture vibrations.
- State Machine: Created a state machine in Home Assistant to track the sensor’s state. When vibration is detected, it sets a state to ‘on’.
- Delay Timer: Added a 10-minute delay after the last vibration. If no further vibrations are detected, it triggers a notification.
- Notification: Used the notify component to send a push notification to my phone.
I also learned the importance of testing different delay times to ensure it doesn’t trigger too early or too late. Initially, I tried a 5-minute delay, but it was too short. After some trial and error, 10 minutes seemed perfect for my dryer’s cycle.
Would love to hear if anyone else has tackled a similar project or has tips for improving this setup! ![]()
![]()