18.2 bug stops complex HomeKit automations from working

Do you have some HomeKit automations set up that suddenly stopped working after your Home hub (HomePod or Apple TV) updated to 18.2, and you're losing the will to live trying to diagnose what happened? It's not you, it's an insidious and obscure bug in 18.2. If you have automations that do not only set scenes or accessories but are shortcuts, and these shortcuts contain the 'Calculate' action, this action will fail. It works if you test the automation in the Home app, whether step by step in the godawful shortcut designer (with the 'play' button) or if you just tap 'Test Automation', but it silently crashes if the automation triggers normally.

I reported this bug with the Feedback app during the 18.2 beta cycle, but it nonetheless made it to the final release. It's obscure and probably doesn't affect that many people, so who knows when it'll get fixed - meanwhile the only solution I found is to downgrade a HomePod to 18.1 and hope it stays there.

HomePod mini, 18

Posted on Dec 15, 2024 6:19 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 5, 2025 1:37 PM

Interesting… maybe the problem is more nuanced than I thought. It can be confusing because Personal Automations (triggered directly on your iPhone or iPad) are different from Home Automations (triggered by your Home hub, like a HomePod or Apple TV). The personal ones may work as expected since they run directly on your device with fewer background restrictions.


I just realized that some of my Get Contents of URL Shortcuts (which are still working) are not started via Home Automations but rather through Hazel or Keyboard Maestro scripts running on my home Mac. Those execute flawlessly, likely because they’re not constrained by the HomeKit environment. However, the same actions embedded in Home Automations fail for me, just like you’re experiencing.


So the temporary workaround would either be using a Home Hub that is on 18.1 OR using one of the third party automation tools to kick off from a computer that's always on.

Similar questions

31 replies
Question marked as Top-ranking reply

Jan 5, 2025 1:37 PM in response to ako9000

Interesting… maybe the problem is more nuanced than I thought. It can be confusing because Personal Automations (triggered directly on your iPhone or iPad) are different from Home Automations (triggered by your Home hub, like a HomePod or Apple TV). The personal ones may work as expected since they run directly on your device with fewer background restrictions.


I just realized that some of my Get Contents of URL Shortcuts (which are still working) are not started via Home Automations but rather through Hazel or Keyboard Maestro scripts running on my home Mac. Those execute flawlessly, likely because they’re not constrained by the HomeKit environment. However, the same actions embedded in Home Automations fail for me, just like you’re experiencing.


So the temporary workaround would either be using a Home Hub that is on 18.1 OR using one of the third party automation tools to kick off from a computer that's always on.

Dec 19, 2024 1:09 PM in response to mvan231

There doesn't seem to be any way around it in 18.2. In my case, I'm certain the issue is specifically with the offending action. I know that the automations trigger, and that they start running, but they silently crash when they reach the 'calculate' action. It sounds from other posts like other actions can also be affected. As soon as I switch the home hub to the HomePod mini I downgraded to 18.1, everything works normally.

Jan 31, 2025 4:39 PM in response to ako9000

Yes, I've just encountered this too (18.3 on my iOS devices, but 18.2 on HomePods and AppleTV). I had to do extensive testing to prove that the exact line of "code" it's failing on in the Calculation step (and it fails whether you use Calculate or Calculate Expression. And yes, I also observed that if you "test" the shortcut using "Test Automation" or running it from within the shortcut, it works.


What a frustrating and stupid bug!


However, I did somehow manage to get past this problem on another Home Automation last night. I have 2x automations triggered by motion in the office (one for Night and one for Day). Last night I was play around with the "Night" one and after initially encountering the same behaviour, I somehow managed to get it it to work (I'm not sure how), but today, using the "Day" automation, I just can't get past this bug. For a long time, I've held the view that the Shortcuts app is one of the buggiest things Apple has ever produced (yes, even worse than the Podcasts app!) and one of the issues seems to be how the back end code of the shortcut is "assembled" in response to changes made in the UI (sometimes just re-ordering steps can fix it). Clearly the Home app uses the same messy code when building Shortcuts in Home Automations. I suspect that last night's tinkering somehow lucked upon just the right combination of steps to make that shortcut code assemble properly. However, that still doesn't explain how it still works when you "test" run the automation but doesn't work when that automation is triggered by an event.

Jan 31, 2025 4:56 PM in response to Lachlanwilliams

Yes, I've just encountered this too (18.3 on my iOS devices, but 18.2 on HomePods and AppleTV). I had to do extensive testing to prove that the exact line of "code" it's failing on in the Calculation step (and it fails whether you use Calculate or Calculate Expression. And yes, I also observed that if you "test" the shortcut using "Test Automation" or running it from within the shortcut, it works.


What a frustrating and stupid bug!


For a long time, I've held the view that the Shortcuts app is one of the buggiest things Apple has ever produced (yes, even worse than the Podcasts app!) and one of the issues seems to be how the back end code of the shortcut is "assembled" in response to changes made in the UI (sometimes just re-ordering steps can fix it). Clearly the Home app uses the same messy code when building Shortcuts in Home Automations.

Feb 2, 2025 2:51 PM in response to Lachlanwilliams

I believe the difference is where the shortcut runs (executes). When you “test” the shortcut it runs on the current device (e.g. your iPhone or Mac) but when it’s triggered by an event (e.g. time of day) it’s run on the home hub. In 18.2 I found that “Calculate expression” containing modulus didn’t work on home hub by “Calculate” would work. But in 18.3 even Calculate 1+1 doesn’t work anymore and will silently abort execution of the shortcut.


It’s very disappointing and makes me seriously consider just moving everything over to Home Assistant.

Jan 30, 2025 2:16 PM in response to georgesdib

I can confirm it's *not* fixed in either HomePod 18.3 or tvOS 18.3. Same bug as in 18.2, automations silently failing.


Very disappointing that not only this kind of bug slips through Apple's quality control, twice, but also bug reports+discussions on the forum just get ignored. Unf I rely on these automations to keep my house heating working so can't just give up and have to keep wasting hours of my life on this. Clearly wasn't a good idea to rely on Apple for something halfway important.

Jan 5, 2025 1:06 PM in response to CGDaveMac

Thanks a lot.

My feedback ID: FB15749665. I added your ID to my report as well.

I'd be interested to hear more about your workaround. On my side, the shortcut in question gets kicked off by a change in a state of a switch, and it still fails. But I'm not sureI understand well the difference you're making between an automation and a shortcut.

Mar 31, 2025 2:26 PM in response to Achilles2025

Well, I'm afraid it's not quite fixed.

When my Home Hub is set to a 18.4 device, the automations no longer crash, but even more strangely, the 'Calculate' action gives wrong results.

I don't have the time right now to fully diagnose what the exact problem is, but it's quite evident in the fact that my automations have different results when triggered using 'Test Automation' on my phone (where they execute locally, and the result is correct) and when triggered automatically (they execute on the home hub, and the result is different and wrong).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

18.2 bug stops complex HomeKit automations from working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.