Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

aristosv

macrumors newbie
Original poster
May 29, 2022
1
0
Hello,

I just started experimenting with shortcuts and I need some help to figure things out. I want to create the following 2 shortcuts/automations.

Automation 1: When the iPhone connects with CarPlay, if the time is before 12:00, say good morning. In this automation I can't figure out how to discover if the time is before 12:00. I can see there are options for date and time, but not just for time.

Automation 2: When the iPhone connects with CarPlay and I start driving, say "wear your seatbelt". In this automation, I don't know how to find out if I started driving. I can see some options for location services, but nothing related to location movement.

Any help is appreciated
Thanks
 
Re: #1. Easy. The Format Date action allows for custom formats. Select custom and specify "HH" (no quotes), pass "Current Date" variable. Action will return 0-23. Pass that value to your if statement, making sure the passed value is treated as a number.

#2, guessing not reliably/easily doable.

For #2, Focuses. Use the Focus action: turn on a Focus with "until I leave" clause. Then add an Automation that triggers when that Focus turns off to do the "Say". Probably want to create a separate Focus for this task, as don't want odd behavior when a "real" Focus turns off.

(aside Re: say seatbelt part: imo, not needed, as car will nag you to put a seatbelt on when moving, why jump through hoops for redundant feature/behaviour? I'd just skip this.)

With the Driving Focus, this might work:
  • Configure Driving Focus to be Manual
  • Create Dummy Focus: does not matter what the options are as will turn off shortly
  • Create "When CarPlay Connects" Automation
    • Check time and say if needed
    • Turn on dummy Focus with "until I leave"
  • Create "When Dummy Focus Ends" Automation
    • Say "seatbelt"
    • Turn on Driving Focus
  • Create "When CarPlay Disconnects" Automation
    • Turn off Driving Focus
 

Attachments

  • pre-noon.png
    pre-noon.png
    147.4 KB · Views: 89
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.