Can the iphone moble app report to HA that I'm connected to carplay?

I’m using 2026.3.1 which is install on Proxmox VM. My automation to open my garage door when I get close to my house doesn’t always work. The automation uses the activity sensor from the iphone to determine that I’m in the car driving and not just out for a walk. The activity sensor doesn’t always work reliably and I’m looking for an alternative. If the companion app for my iPhone 16Pro on IOS 18.6.2 was able to let home assistant know I’m using carplay that would be great. Unfortunately I’ve been unable to find or turn on that sensor. Any ideas would be appreciated or alternatives. Here is my yaml

alias: Auto-open Garage on Approach or Arrival
description: Open the garage when approaching or arriving home by car (6am–midnight)
triggers:
  - entity_id: device_tracker.my_names_iphone
    zone: zone.garage_approach
    event: enter
    trigger: zone
    enabled: true
  - entity_id: device_tracker.wife_names_iphone
    zone: zone.garage_approach
    event: enter
    trigger: zone
    enabled: true
  - entity_id: device_tracker.my_names_iphone
    zone: zone.home
    event: enter
    trigger: zone
  - entity_id: device_tracker.wife_names_iphone
    zone: zone.home
    event: enter
    trigger: zone
conditions:
  - condition: time
    after: "06:00:00"
    before: "23:59:59"
  - condition: state
    entity_id: cover.garage_door
    state: closed
  - condition: or
    conditions:
      - condition: state
        entity_id: sensor.my_names_iphone_activity
        state: Automotive
      - condition: state
        entity_id: sensor.wife_names_iphone_activity
        state: Automotive
  - condition: state
    entity_id: input_boolean.automation_overide
    state: "off"
actions:
  - data:
      title: Arriving Home
      message: Garage Door opening in 10 seconds
    action: notify.mobile_app_my_names_iphone
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
    enabled: false
  - target:
      entity_id: cover.garage_door
    action: cover.open_cover
mode: queued

Hi, you can check if you can solve with a iPhone shortcut automation triggered when the phone Connect/Disconnect to your car’s Bluetooth.
That situation in my case is switching a switch (template) via HomeKit.

Created a shortcut animation when carplay connects. The do section I had to create a dictionary with key or entity_id my input boolean for carplay. Then call service input boolean turn on with data - Server Home and dictionary below that. Don’t know why I can’t just pick the helper from a list. Do I now just need to go the the car and after it connects see if the help gets turned on?

Yes try it and see if the input boolean changes state in home assistant.

Ps i remember on iPhone i had to first create a direct shortcut to just activate the input boolean.
The i use this shortcut in the “Do” action of the automation.