I understand you regarding the polling. I have it set to 10 seconds only while trying to figure out my problem. Then I will set it to something like 10 minutes.
Obviously you know the App way better than I do, but when I say it "stops", I am solely basing this on what I see in the log - the log actually stops logging any activity. To rule out the NO path on the Battery level block, I tied it into the top of the 10 second timer. When I press START it cycles through every 10 seconds and publishes the Battery Level, but when put another open app in foreground, my flow seems to stop. I can go back and put Automate in foreground, nothing shows to be logged from the moment I took it out of foreground earlier and the Stop button shows "Stop (1)" like it is still running but nothing new is being logged. If I press Start, it tells me I cannot have duplicate flows running. I can press Stop and it will then log "Stopped by user".
Oddly the MQTT Client app does not ask for any Permissions and it functions in background just fine. What would you think the minimum Permissions would be for my Automate flow? Is there a better way to get Battery Level published to MQTT broker than the flow that I am doing?
Thank you for taking the time to help me.