Just browsing quickly over the comments, it appears you could simply monitor whether your cell phone is on charge [GRID POWER IS ON] or not [GRID POWER IS OFF].
Ask chatGPT to create a single file html5, css3, JavaScript web app that will monitor your phones battery state. It must make the screens background red when the power is off and green when the power is on.
Now save the code to .HTML file and run it. Ensure your phones screen remains on. There are apps that will do that for you.
Good luck.