Got a question< been spending hours trying to work it out.
so i have a flow, bluetooth enabled, connect to bt speakers, play music.
Now, i would LIKE bluetooth to turn of when no screen on, Unless this flow is working, if it is working (it is connected up, and playing music) its stay on, even with screen off, if it isnt connected to speakers and not playing music, turns it off.
is this possible please?
been spending hours trying to work this out!
Moderator: Martin
- Autumn-Leigh
- Posts: 67
- Joined: 15 Mar 2018 19:23
- Location: UK
- Contact:
been spending hours trying to work this out!
YouTube Channel - https://youtu.be/fui3RO9EmNU
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know

Re: been spending hours trying to work this out!
I have a similar (?) flow. Its intent is to look for Bluetooth being disconnected for over 5 mins, the phone being left alone, on battery power and, if so, disable Bluetooth. The flow is set to stop executing existing instance and execute afterwards if it's retriggered. So it's doesn't (and I'm not sure you can) test for music actually being played.
But if you control the music player via a flow too, you can of course tell when you have stopped the music.

But if you control the music player via a flow too, you can of course tell when you have stopped the music.
Re: been spending hours trying to work this out!
When Screen off >> Trigger Display state off.
Only when not connected to bluetooth and not playing music >> condition bluetooth connected false and Music Active false.
No need to check for the flow is running.
==========
Trigger : Display off
Condition 1 : Bluetooth Device Connected : Any
false >> Condition 2 : Music Active
false >> Action : Set Bluetooth State : Off
==========
If you turn off you display frequently and think this flow consume more (actually almost nothing), you can add an extra flow with trigger Bluetooth State On, and enable this flow. At the main flow, add additional set flow, disable itself after set bluetooth state off.
Only when not connected to bluetooth and not playing music >> condition bluetooth connected false and Music Active false.
No need to check for the flow is running.
==========
Trigger : Display off
Condition 1 : Bluetooth Device Connected : Any
false >> Condition 2 : Music Active
false >> Action : Set Bluetooth State : Off
==========
If you turn off you display frequently and think this flow consume more (actually almost nothing), you can add an extra flow with trigger Bluetooth State On, and enable this flow. At the main flow, add additional set flow, disable itself after set bluetooth state off.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: been spending hours trying to work this out!
Ah ha! Music Active condition is something useful I'd not spotted before 

- Autumn-Leigh
- Posts: 67
- Joined: 15 Mar 2018 19:23
- Location: UK
- Contact:
Re: been spending hours trying to work this out!
Your a legend! and my hero! Thank youDesmanto wrote:When Screen off >> Trigger Display state off.
Only when not connected to bluetooth and not playing music >> condition bluetooth connected false and Music Active false.
No need to check for the flow is running.
==========
Trigger : Display off
Condition 1 : Bluetooth Device Connected : Any
false >> Condition 2 : Music Active
false >> Action : Set Bluetooth State : Off
==========
If you turn off you display frequently and think this flow consume more (actually almost nothing), you can add an extra flow with trigger Bluetooth State On, and enable this flow. At the main flow, add additional set flow, disable itself after set bluetooth state off.

YouTube Channel - https://youtu.be/fui3RO9EmNU
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know

- Autumn-Leigh
- Posts: 67
- Joined: 15 Mar 2018 19:23
- Location: UK
- Contact:
Re: been spending hours trying to work this out!
im so excited for this new condition hahaWibbly wrote:Ah ha! Music Active condition is something useful I'd not spotted before

YouTube Channel - https://youtu.be/fui3RO9EmNU
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know

- Autumn-Leigh
- Posts: 67
- Joined: 15 Mar 2018 19:23
- Location: UK
- Contact:
Re: been spending hours trying to work this out!
Thank you, this will come in use to me tooWibbly wrote:I have a similar (?) flow. Its intent is to look for Bluetooth being disconnected for over 5 mins, the phone being left alone, on battery power and, if so, disable Bluetooth. The flow is set to stop executing existing instance and execute afterwards if it's retriggered. So it's doesn't (and I'm not sure you can) test for music actually being played.
But if you control the music player via a flow too, you can of course tell when you have stopped the music.

YouTube Channel - https://youtu.be/fui3RO9EmNU
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know
If anyone wants a shoutout, or has a flow they want me to do, be it theirs or a new one, let me know
