by Vinicius de Moraes
Version 1 (April 7, 2026)
Download (25 downloads)
A basic Flow that locks / turns the screen off after user inactivity to save battery 🔋
Motivation:
Made this because if I fell asleep while an app that prevents default Android sleep was running, such as "Instagram while a reel is running", or TikTok, or any such video app that just keeps looping indefinitely, then it never lets the phone sleep, fully draining your battery over the next many many hours.
Then I'd wake up in the morning to a dead phone. 🪫
Ideally I'd like for it to always sleep after X minutes of no user touch input. Since that is not possible under Android permissions, I've settled for a "very sensitive" Accelerometer as proxy for user interaction.
This flow does not keep the phone awake or mess with the default screen timeout.
By default it will show a prompt dialog "Are you still there?" before sleeping, allowing you to dismiss the auto sleep (if the prompt is ignored for 30 secs, the phone sleeps).
Config: You can set the timeout on Block 3, by default it's 4:30 minutes of the phone being completely still.
Block 8 has a 30 second delay that isn't necessary for the functionality, but it's there just to further reduce battery usage while the Fiber is running.
On average that means every ~4m45s of inactivity the phone will try to sleep, showing the dialog.
Accelerometer Sensitivity can be changed using the Minimum field in Block 4. Default is 0.05
Based on https://llamalab.com/automate/community/flows/42595
With some adaptations and battery efficiency improvements.
| 5 stars | 3 | |
| 4 stars | 0 | |
| 3 stars | 0 | |
| 2 stars | 0 | |
| 1 star | 0 | |
| Reports | 0 |
Rate and review within the app in the Community section.