Determining if garage door was opened via Carplay

Hello,

I am running Home Assistant 2024.8.2 in docker

I recently bought an AppleTV to act as a homekit hub and have connected it to HA via the homekit hub. I am exposing only 1 device from HA - cover.toyota and that is working great. Via Carplay, I can see the status, open/close the door, etc.

What I would like to do now is if the garage door is opened from carplay, then also disable alarmo when it opens. I found a few examples online regarding how to capture the homekit_state_change event, but it doesn’t seem to be triggering for me. Here is my yaml and my automation.


If I manually run the automation, it seems to work fine, but it doesn’t automatically trigger. The logbook seems to indicate the event is being seen. Feels like I am missing something. Any suggestions?

  1. Go to Developer Tools → Events → Listen to events
  2. Enter homekit_state_change
  3. Click Start Listening
  4. Open the garage door with CarPlay
  5. Observe the displayed event details

If no event is displayed then Home Assistant didn’t receive an event with that name.


FWIW, I don’t have a Homekit-compatible garage door opener to test but I do have ecobee Switch+ switches (Homekit; they have several built-in sensors for motion, light, and temperature). Home Assistant doesn’t detect a homekit_state_change event when the switch is turned on/off or when it detects motion. Not exactly equivalent to testing your garage door but just thought I would let you know the results.

Thanks for the reply. That is even more confusing.

I am seeing the open and close events. But my automation isn’t running at all. The time on the automation shows that it has never run. I even narrowed down the automation to only the detect and a notify. I ran it manually and the notify works - but something is causing it not to trigger.

HA-Events-Open

In your automation, the event data has an action key. Change this to service like in the event you received.

You can also check your automation traces to debug.

1 Like

Do what Pieter said; the event details show there’s no action key but there’s a service key with the desired value (open_cover). Changing action to service should do the trick.

When you execute an automation’s Run command, it simply executes the automation’s actions (i.e. it doesn’t exercise the trigger or the condition).

1 Like

Thanks for all you participating in this discussion. Indeed changing it from action to service causes the automation to execute. I was trying to follow the example on the homekit page and I guess I just didn’t understand the nuances of the options.

Thanks again!

2 Likes