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

JaCkPoT_

macrumors newbie
Original poster
Apr 14, 2025
3
0
I want my Focus "Home" to be enabled when the following 2 conditions are met:
1. I must be at Home (my own location)
2. It should only be on between 00:00 (midnight) and 10:30 AM.

If I set the focus setting to both "at location" and "time 00:00 to 10:30" it will activate every time I'm home regardless of time, and it will also activate at 00:00 regardless of where I am.. I have also tried to add the "Smart activation" but that does not seem to do any changes for me.

So to get this to work, I guess I have to make an automation in the shortcut app. However, I have tried and tried (I'm a real newbie here), and I don't seem to make it work. I have also tried ChatGPT's iPhone shortcuts and a website that makes the shortcuts for you via AI, but none of them have made it work for me.

I find it very strange that Apple does not have an "AND/OR" option for the focus settings.

Is there anyone here that know if this i even possible? And if so, maybe could help me to set this up?
 
So to get this to work, I guess I have to make an automation in the shortcut app. However, I have tried and tried (I'm a real newbie here), and I don't seem to make it work. I have also tried ChatGPT's iPhone shortcuts and a website that makes the shortcuts for you via AI, but none of them have made it work for me.
Yeah, you would need to create a couple automations. It's not possible with a single automation, which may be why you're getting stuck.
  • One to run at 00:00 every day.
    • Check if you are home. If so, turn on Focus; if not, do nothing.
      • This can be accomplished several different ways.
        • Use Get Current Location (street) and check if it matches your street.
        • Use Get Distance action (current location to your home location) and check if you're within 100m or so.
        • Use Get Network Details action to get the Wi-Fi network name that the device is connected to and check if it matches your home Wi-Fi network name. (This is assuming your phone is always connected to Wi-Fi when you are home, and that your Wi-Fi has a fairly unique name.)
  • One that runs when you arrive home.
    • Check if the current time is between 00:00 and 10:30. If so, turn on Focus; if not, do nothing.
I find it very strange that Apple does not have an "AND/OR" option for the focus settings.
I agree. Home automations sort of have this option already, but still require two separate automations depending on what you want to do. With Home automations, you can have something run at a certain time, but only if you're home; similarly, you can have something run when you arrive home, but only during certain hours. The above is basically just replicating that logic manually.
 
  • Like
Reactions: NoBoMac
To add to what @BigBlur wrote, another way to accomplish "where" is to save a flag/bit to a file. An "AtHome?" flag.

So, an Automation for "when arrive home" geofence, in addition to the suggested time check above, save/set "AtHome" flag to true. And have a corresponding Automation for "when leave home", unset the flag.

I do this, along with other flags for tracking time of day, location, in the car, etc via a dictionary file. Aka a simple database, lookup table. Let the phone do the heavy lifting to determine things and simply see if a condition is true or false.

Code:
{
  "AtHome": 0,
  "GymDay": 0,
  "HaveAppt": 0,
  "CellStats": "05-13-2025",
  "EventTime": "",
  "FootballDay": 0,
  "HaveWatch": 1,
  "BedTime": 0,
  "LastNoteBackup": "04-14-2025 10:30:03",
  "InCar": 0,
  "FaceList": 1,
  "HikeDay": 0,
  "IsNight": 0,
  "SilenceUnknown": 1,
  "LastVolume": -1,
  "LastDropSync": "04-14-2025 10:30:12",
  "WhichAW": "AW10",
  "Today": "2025-04-14"
}
 
  • Like
Reactions: BigBlur
Yeah, you would need to create a couple automations. It's not possible with a single automation, which may be why you're getting stuck.
  • One to run at 00:00 every day.
    • Check if you are home. If so, turn on Focus; if not, do nothing.
      • This can be accomplished several different ways.
        • Use Get Current Location (street) and check if it matches your street.
        • Use Get Distance action (current location to your home location) and check if you're within 100m or so.
        • Use Get Network Details action to get the Wi-Fi network name that the device is connected to and check if it matches your home Wi-Fi network name. (This is assuming your phone is always connected to Wi-Fi when you are home, and that your Wi-Fi has a fairly unique name.)
  • One that runs when you arrive home.
    • Check if the current time is between 00:00 and 10:30. If so, turn on Focus; if not, do nothing.

I agree. Home automations sort of have this option already, but still require two separate automations depending on what you want to do. With Home automations, you can have something run at a certain time, but only if you're home; similarly, you can have something run when you arrive home, but only during certain hours. The above is basically just replicating that logic manually.
Thanks for helping out!

I tried what you said, for the first step. However, I don't think I have the setup correct here, as it will now activate regardless of location.

I belive it's correct that the first section says "Turn Hjemme (home in Norwegian) on until Time 11:00", but I feel that I'm missing something in the IF section, I have "Get current location", but it should be more?

Again, I'm very noob, so sorry for the basic questions
 

Attachments

  • 490996839_909778574506981_696236888580290551_n.jpg
    490996839_909778574506981_696236888580290551_n.jpg
    72 KB · Views: 17
  • 491008806_3592937694340971_5894800433170263177_n.jpg
    491008806_3592937694340971_5894800433170263177_n.jpg
    79 KB · Views: 18
I’ve been searching and trying now, and I figured it out at the end! Thanks again for helping, it put me in the right track for sure.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.