by Mr W
This flow will automatically activate the Night Clock app when plugged into power. (I use my phone as my alarm clock.) Then when I wake in the morning and unplug the phone, the home screen automatically displays.
This is an example of getting something to happen when the power supply changes.