We’ve got a home alarm that has a shortcuts enabled app, and I’d like for it to run automatically when I put my phone on the charger at the end of the day. So, essentially, I guess it would look like this, but I don’t know how to set it up:
That might work if you add an automation checking for the device to be charging, which then runs a shortcut checking the time, and if that is after 11pm sets the alarm.
Dont think automations can use 2 triggers (charger + time) on its own.
I have a personal automation that runs when I connect it to power that runs a shortcut. That shortcut checks the time and if it is after 9 PM and connected to my home Wifi, it turns out my bedroom light, connects to the Air Play speaker in my bedroom and then, regardless of where I am, it plays 50 minutes of noise via Dark Noise to help me relax/sleep.
Thanks for the “how to just extract the time” tip. Just yesterday I needed it - for extracting today’s Omnifocus tasks and updating a draft with the Due Time. (I used the same method - but I was wondering if that was the best/only way.)