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 Dec 19, 2024 10:34 AM

Update: turns out that the get contents of URL action causes the automation to never run. How bizarre.


For now, I've duplicated my home automations and removed the get contents of url action from the ones I want to have working

31 replies
Sort By: 

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.

Reply

Feb 1, 2025 1:03 PM in response to ako9000

Hier auch. Wollte seit ein paar Tagen eine Automation in HomeKit mittels Kurzbefehl per Automation an Home Assistant senden. Alles für sich hat funktioniert, Kurzbefehl auslösen, Automation testen, aber komplett funktioniert es nicht. Unter anderem mit „Inhalt von URL-Kurzbefehlen abrufen“….. ich habe Tage damit verbracht um es zum Laufen zu bringen, sehr ärgerlich. Hoffentlich fixt Apple diesen Bug bald


Reply

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).

Reply

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.

Reply

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.