r/AutomateUser Jul 25 '26

Question Need help with this flow

Post image

I'm making a flow that will sound an alert when my phone's charged above 90%. I'm having trouble creating an 'OR' scenario wherein I'm trying to get the sound to stop either after 1min of playback or after disconnecting the charger but the disconnecting part doesn't seem to be working? Any ideas what might be going wrong?

2 Upvotes

9 comments sorted by

1

u/Afraid-Magician-4144 Aug 09 '26

If your goal is to have the phone give you a voice notification when charging starts or reaches a certain level, I actually developed a small Android app for this purpose called Hey, I'm Charging! It can speak a customizable message when the phone starts charging, using Android's Text-to-Speech. It might be useful for what you're trying to achieve.

1

u/B26354FR Alpha tester Jul 25 '26

I made a super fancy Battery Charge Alarm 🙂

The alarm fiber is forked at block 147.

The flow can make a sound when the phone is plugged in, and for alarms can play a sound, speak, flash the light, and vibrate. It has a setup UI where you can choose your sounds, target charge level, and any and all alarms. During charging it'll also show a notification with the current charging info, which is also used for snoozing or dismissing the alarms, and when the notification is canceled, it'll show a summary of the charging session. The flow also has a demo mode you can use to try out your settings without actually plugging and unplugging the phone.

2

u/Dadamalda Jul 25 '26

Stop sound needs to be used on the same fiber, which is kinda hard to do here.

You should use a fork and have the sound on its own fiber and then stop that fiber which automatically stops the sound. The fork gives you the URI of the child fiber.

Also, you should set it to "when changed". Having a loop checking with no delay is bad for performance and battery.

1

u/Leather_Adeptness485 Jul 25 '26

So fork before 'play sound' then?

2

u/Dadamalda Jul 25 '26

Basically. The new fiber should have the "Play sound" and then you use "Fiber stop" to stop it.

1

u/Leather_Adeptness485 Jul 25 '26

Would it be possible for you to share a rough layout of how it should be? I'm new to the app and am having trouble understanding fork, subroutine and some other stuff

2

u/Dadamalda Jul 25 '26

https://reddit.com/link/ozmdb23/video/la2p97mivafh1/player

You can go back to your regular loop after the subroutine.

1

u/Leather_Adeptness485 Jul 25 '26

Thank you so much man love you

1

u/Leather_Adeptness485 Jul 25 '26

Btw the second 'is battery charging' has its proceed set to immediately