Battery flow

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Battery flow

Post by Rafi4 » 03 May 2018 01:11

Hi
I make this flow. But not working properly. Speak text is perfectly working.others are not working properly. Any help?
Attachments
battery.xml
(9.28 KiB) Downloaded 629 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Battery flow

Post by digitalstone » 03 May 2018 03:05

Hi,

I have taken a look at your flow, and there are basically 2 things i would like to address:

Connect/disconnect conditions:
The main problem in your flow branches was such as, having both a condition "Power Source Connected" output to 'false' with directly afterwards a condition "Power Source Connected" with output 'false'.
Such setup will never pass further than the second condition because 2 opposite binary states about the same issue can not both be false at the same time.

Efficiency:
When dealing with setting up systems like these, it's common practice to (at least try to) make use of anything as less as possible.
In the case of your flow for example, you would like to setup your sound volume only once at the beginning, because each and every branch of this flow needs this setting anyway.

There is a possibility i could make your flow better, but at least it works now.
Unless it doesn't ;)

-- EDIT --
Also, i don't know why you would want a 100ms delay in your flow before playing the sound (2th branch) but i just left it there for you to alter.
Attachments
battery v2.0.xml
(7.35 KiB) Downloaded 658 times
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

Post Reply