The only home automation feature my wife cares about is the garage door opening magically when she gets home from work. I find that iCloud’s location tracking is quite reliable, so I use the automation functionality of the iOS Home app to trigger opening the door.
I was jazzed to see that I could set the garage’s device_class as garage, mainly because this causes the GUIs of both HomeAssistant and Apple’s Home app to display intuitive state icons. However, once the Home app recognizes the entity as a garage, it does not allow it to be opened automatically by an automation, instead requiring a user confirmation to be entered on an unlocked iOS device.
Geeky security sidebar: This is actually quite clever on Apple’s part. By requiring the device to be unlocked, they are enforcing two-factor authentication for this action. This means that physically possessing the device (something you have) is not enough, you also have to be able to unlock the device using either the passcode (something you know), or TouchID / FaceID (something you are).
To get around this limitation, I created a simple script to call the cover.open_cover service, which the Home app sees as a switch via the Homekit component. I then I used this switch in the Home app automation, in place of the actual garage door entity.
Here’s the relevant code bits and some screen captures from the Home app, if anyone else comes across a similar issue.
I’m just moving across from running old Homeassistant and Hombridge now HA has Homekit.
My garage door is controlled via a Wemo Maker and via HomeAssistant with Homekit I see this in my iOS Home app but as a Switch. When I was using Homebridge it appeared as a Garage Door with the correct icon as shown above, plus I got Home app notifications on open/close as the Wemo maker also has a sensor hooked up.
Anyway, I guess the issues is why is HA and Homkit showing it as a switch not a Garage Door. I tried adding the below and re-adding my Homkit items but its still a Switch (or Fan or Light), no Garage Door option, any ideas?
Does the Wemo Maker show up in HA as a switch or a cover? And if it’s a cover, does it support open and close as described in the HomeKit component’s supported components table?
One workaround that I thought of would be to have HA treat the Wemo Maker as a switch, and to use the Template Cover component to expose it to HomeKit as a cover. There’s an example on that page that might help.
Exactly, if it’s showing a blind I’d say you’re 95% there. If you set the device_class of the cover to garage you should be all set. Let us know how it goes.
I live in an Apartment, and my Garage opens with the remote, and closes automatically after 2 minutes !!
I would like to open it with Broadlink and add it to homekit !
I already tested with broad link command, and it works from my apartment!!! I can open it!
But now I want to integrate with HA and then Homekit !!
I want to open it and set a timer to automatically close !!
Can someone help me with the code?
Interesting workaround. I’ll be trying something like this as well.
Are you able to open the garage door via Siri even when the phone is locked, or do you need to ask Siri to “turn on Garage Trigger” ?
The second, “Turn on garage trigger”. However, I almost never do that and just use “Open/close the garage door.”, unlocking my phone if I need to. The trigger switch works great for the HomeKit automation though.
I’m still trying to find a reliable method to open the garage door and disarm the alarm as I approach the house. So far I’ve been unsuccessful getting the scripts for the garage door, I have two, big and small, and the alarm to appear in Homekit. Here’s the code:
UPDATE: garage_trigger used in an Apple Home automation opens the door without the unlock requirement. Unfortunately, when used in an arrive home automation, the door opens when i leave and when I return. Anyone run into this?
I noticed some variation in entity naming earlier in the discussion. Is the name cover.garage_door used consistently in all code references? I’m on myq, so can’t be of much help.
Hey folks, sorry for reviving an old topic, but I think I may have found the solution to this. (Maybe this will help other people that find this thread…)
I got it to work in HomeKit and the Home app by adding the garage door as a cover in my config.yaml and then customizing it by setting the device_class: garage, as stated above. However, I was still getting the blind icon in the iOS Home app, and it would not open or close the door.
I was able to fix it by resetting the accessories. You can do this by calling homekit.reset_accessory and supplying the entity ID. Easiest way to do this is by using the Services tab in the Home Assistant developer tools.
This appears to reset the HomeKit cache and fix the garage door! Now the icon correctly shows my door, the state is correct, and I can raise/close the door as expected.