Google Assistant Door and Window Status

I’ve found a way to integrate my door and window sensors so that I can query the status of a sensor with Google Assistant.

You can create a template cover for each door and window sensor, then export the covers to Google Assistant.

In your configuration.yaml file:

Create cover templates:

cover:
  - platform: template
    covers:
      kitchen_window:
        device_class: window
        friendly_name: "Kitchen Window"
        value_template: "{{ is_state('binary_sensor.kitchen_window_sensor', 'on') }}"
        open_cover:
        close_cover:
      front_door:
        device_class: door
        friendly_name: "Front Door"
        value_template: "{{ is_state('binary_sensor.front_door_sensor', 'on') }}"
        open_cover:
        close_cover:

Make sure that cover is exposed, or expose your individual door and window cover templates

google_assistant:
  # your other google assistant yaml code here
  exposed_domains:
    # your other domains here
    - cover

Then restart Home Assistant to get your templates and google assistant exposed domains loaded, then re-sync Google Assistant (“OK Google, re-sync my devices”).

Make sure you have the new devices in Google home and move them to appropriate rooms. Windows look like blinds, and doors look like… boxes with a lens on them (maybe garage door opener like MyQ Garage)

Once done, you can ask google “OK Google, is the kitchen window open?” and it will tell you if the window is open or closed, or “OK Google, are any windows open?” to give you the status of multiple windows, etc.

This can be used in routines, such as your bedtime routine including the command “are any windows open?” etc.

1 Like