Hi all,
I have scripts that perform a series of actions for when we arrive home (open our gate, our garage door, unlock the mudroom door, etc.). They’re only triggered manually—no automation. I have an old car, and I run these using Shortcuts on my iPhone via the “Today” screen. The shortcut calls ‘script.turn_on’ with data {“entity_id”:“script.bmw_arrival”}. The “bmw_arrival” script performs the steps I want. All good.
My wife just got a new car with CarPlay. She has an identical setup on her phone, except her arrival script is called “porsche_arrival”, and she accesses it primarily from the “quick actions” in the HomeAssistant Carplay app instead of using Shortcuts.
This works, but it randomly reruns. Once, it happened hours after she got home; just recently it ran three times in a row within a few minutes.
I have debug logging enable for homeassistant.core, and homeassistant.components/script/automation/mobile_app/ios. When reviewing these logs, the initial (correct) trigger as well as the subsequent triggers all look identical. From HA’s perspective, it seems that someone is tapping these Quick Actions repeatedly, but of course that’s not what’s happening.
Of interest: the one time it happened hours after her arrival, it appears from the logs that her phone joined Carplay (I have no clue why; it was in the home and on our WiFi), and then immediately reran the script. My guess is that the car woke up to check for a software update or perform some others task, spun up its wifi connection, and her phone was close enough to it to hop on its network.
Given that our setups are near-identical with the only difference being CarPlay, I suspect that’s where the problem lies.
Does anyone have any ideas for me? I’m just completely stumped.
Is there a CarPlay specific logger I can run?
I enabled “ask for confirmation” in the carplay app; I’m hoping that’ll help. Still, I’d love to figure out what’s going on and fix the actual problem vs. just papering it over with a second screen.
TIA!