It's supposed to print a toast each time I turn on or off the audio output e.g. via my music app.
This works perfectly for the audio source 'microphone'.
When using 'output mix' it only works for turning on. But turning off does nothing. In the log I see that it's waiting on the sound level block.
The weird thing is it immediately continues as supposed to, as soon as I bring the automate app to foreground.
I tried this several times. I tried waiting for a long time. I tried the device keep awake block to keep awake the CPU. I removed automate from the system battery optimization list. It's always the same. It seems like something is setting the fiber asleep and the automate app awakes it.
I am using automate a lot and it only happens to the sound level block. It also only happens to the audio source 'output mix'. 'Microphone' works fine. I do not run any other apps that record audio.
I didn't find a similar question in this forum. Thank you for your amazing app and your help in this forum.