Create Garage Door Status Notifications in Home Assistant

Create Garage Door Status Notifications in Home Assistant

September 1, 2021•Smart HomeHome AssistantIntegrations

In this guide, I'm going to show you how to create status notifications to let you know when your garage door is opening, opened, closing, or closed.

For reference, I am using a MyQ Chamberlain wifi device that paired with my "dumb" garage door opener. Here's what it looks like:

It's super cheap and has worked perfectly for me over the last 9 months of heavy usage. I open/close the garage door multiple times a day from the app manually and have a separate automation to close my garage at 8pm everynight. It occassionaly does display a "disconnected" message in the HA Logbook, but it has never once failed on me and I've never had to reinstall/reconfigure it.

I've seen many posts where people are curious if they should purchase the MyQ garage door opener to use with Home Assistant. Probably because when they did their research, some people had reported issues. Like I said, I've never had issues, but for ~$30, I have been extremely happy with my purchase so far.

Anyway, this guide will work on all smart garage door openers.

I created this cool automation as a way to "double-check" that whenever I open or close the door, I can confirm that the operation completed successfully. Especially useful when I trigger it away from home.


Install MyQ in Home Assistant

If you don't already have a smart garage door opener and would like to purchase a MyQ, I have a handy How To Configure MyQ in Home Assistant guide you can follow.

If yours is already integrated, then you can just continue following along.


Garage Door Status Automation

This automation uses Triggers and Trigger ID's. Triggers are a relatively new addition to the Home Assistant Automations section and can be extremely powerful. With triggers, I've been able to reduce the number of automations I have by 50% simply by combining multiple automations into 1 automation.

I recommend this video to learn more about triggers. Even if you have zero experience with using triggers or trigger ID in an automation - this script can simply be copied into an automation YAML. The only thing that needs changing is the entity ID and device you want to notify.

alias: 'Garage: Status Notifications' description: '' trigger: - platform: state entity_id: cover.garage_door id: closing from: open to: closing - platform: state entity_id: cover.garage_door id: closed from: closing to: closed - platform: state entity_id: cover.garage_door id: opening from: closed to: opening - platform: state entity_id: cover.garage_door id: open from: opening to: open condition: [] action: - choose: - conditions: - condition: trigger id: opening sequence: - service: notify.mobile_app_pixel_5_danny data: message: Garage door opening... - conditions: - condition: trigger id: open sequence: - service: notify.mobile_app_pixel_5_danny data: message: Garage door open! - conditions: - condition: trigger id: closing sequence: - service: notify.mobile_app_pixel_5_danny data: message: Garage door closing... - conditions: - condition: trigger id: closed sequence: - service: notify.mobile_app_pixel_5_danny data: message: Garage door closed! default: [] mode: single


How To Create the "Garage Door Status" Automation

Log into Home Assistant. Then click the Configuration tab > Automations. Then, create a new empty automation.

In the top right corner, click the 3 dots > Edit in YAML. Then simply paste in the code above.

You can create this from the UI by referencing my code, but like I said, you can basically just and paste this in and change the entity ID and device you want to notify.


How It Works

Your garage door entity should have several states: Opening, Opened, Closing, and Closed.

To confirm, go to Configuration > Entities and search for the entity (cover.garage_door). Click it, then click the settings in the top right corner and view the history timeline. It should tell you all of the available states.

You can also go to Developer Tools > States and filter by entity. Then, toggle the garage door open & closed to verify it changes to all 4 states:

Image 1 from Create Garage Door Status Notifications in Home Assistant
Image 2 from Create Garage Door Status Notifications in Home Assistant
Image 3 from Create Garage Door Status Notifications in Home Assistant
Image 4 from Create Garage Door Status Notifications in Home Assistant