Cover

Home Assistant can give you an interface to control covers such as roller shutters, blinds, and garage doors.

Note

Building block integration

This cover is a building block integration that cannot be added to your Home Assistant directly but is used and provided by other integrations.

A building block integration differs from the typical integration that connects to a device or service. Instead, other integrations that do integrate a device or service into Home Assistant use this cover building block to provide entities, services, and other functionality that you can use in your automations or dashboards.

If one of your integrations features this building block, this page documents the functionality the cover building block offers.

Cover states

A cover can have the following states. Each item shows the label you see in the Home Assistant interface, followed by the state as Home Assistant stores it. If you write templates or edit automations in YAML, use the stored state.

  • Opening (opening): The cover is in the process of opening to reach a set position.
  • Open (open): The cover has reached the open position.
  • Closing (closing): The cover is in the process of closing to reach a set position.
  • Closed (closed): The cover has reached the closed position.
  • Unavailable (unavailable): The entity is currently unavailable.
  • Unknown (unknown): The state is not yet known.

The device class of a cover determines the icon shown for each state. The state labels are the same for all device classes.

Device class

The device class tells Home Assistant what kind of cover an entity is, such as a garage door or curtains. Home Assistant uses the device class to choose the icon and the arrows on the open and close buttons. The device class also decides where you can use the cover, such as in triggers and conditions, in Assist, on the Security dashboard, or in voice assistants. If a cover doesn’t show up where you expect it, check its device class.

The integration that provides the cover sets the device class. When you create a cover yourself with a template helper, you choose the device class.

Device classes in automations and templates

  • Automations: Most device classes have their own triggers and conditions, such as Garage door opened. Of your covers, these triggers and conditions only list the ones with that device class. The list below shows the triggers and conditions of each device class. Dampers and covers without a device class have none.
  • Templates: The device class is the device_class attribute of the entity. Use the stored value, such as garage. For example, you can find entities by device class.

List of available device classes

A cover without a device class is a generic cover and shows .

Each item shows the name you see in the Home Assistant interface, followed by the device class as Home Assistant stores it. The icons show an open cover. If the device class has its own triggers and conditions, they’re listed below the item.

Changing the device class of a cover

If a cover shows up as the wrong type, for example as a window instead of a garage door, you can change its device class.

You can only change the device class in the UI if the cover has a unique ID. A cover without a unique ID shows a message in its entity settings instead. For such a cover, you can change the device class in YAML with customization.

  1. Go to Settings > Devices & services > Entities and select the cover.
  2. In the top-right corner, select Settings .
  3. Under Show as, select the type that matches your device.
  4. Select Update.
    • Result: The cover shows up as the new type in triggers and dashboards.

List of triggers

The Cover integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following triggers. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.

  • Awning closed (cover.awning_closed) Triggers when one or more awnings close.

  • Awning opened (cover.awning_opened) Triggers when one or more awnings open.

  • Blind closed (cover.blind_closed) Triggers when one or more blinds close.

  • Blind opened (cover.blind_opened) Triggers when one or more blinds open.

  • Curtain closed (cover.curtain_closed) Triggers when one or more curtains close.

  • Curtain opened (cover.curtain_opened) Triggers when one or more curtains open.

  • Shade closed (cover.shade_closed) Triggers when one or more shades close.

  • Shade opened (cover.shade_opened) Triggers when one or more shades open.

  • Shutter closed (cover.shutter_closed) Triggers when one or more shutters close.

  • Shutter opened (cover.shutter_opened) Triggers when one or more shutters open.

For an overview of every trigger across all integrations, see the triggers reference.

List of conditions

The Cover integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following conditions. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.

  • Awning is closed (cover.awning_is_closed) Tests if one or more awnings are closed.

  • Awning is open (cover.awning_is_open) Tests if one or more awnings are open.

  • Blind is closed (cover.blind_is_closed) Tests if one or more blinds are closed.

  • Blind is open (cover.blind_is_open) Tests if one or more blinds are open.

  • Curtain is closed (cover.curtain_is_closed) Tests if one or more curtains are closed.

  • Curtain is open (cover.curtain_is_open) Tests if one or more curtains are open.

  • Shade is closed (cover.shade_is_closed) Tests if one or more shades are closed.

  • Shade is open (cover.shade_is_open) Tests if one or more shades are open.

  • Shutter is closed (cover.shutter_is_closed) Tests if one or more shutters are closed.

  • Shutter is open (cover.shutter_is_open) Tests if one or more shutters are open.

For an overview of every condition across all integrations, see the conditions reference.

List of actions

The Cover integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.

For an overview of every action across all integrations, see the actions reference.

Cover automation examples

You can use cover triggers and conditions to adjust lighting, remind yourself when something is still open, and run routines that depend on whether a cover is open or closed.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: turn off the office lamp when the blind opens after sunrise

If daylight is enough for the room, this automation turns off the office lamp when the blind opens in the morning.

  • Trigger: Blind opened
    • Target: Office blind
  • Action: Turn off light
    • Target: Office lamp
YAML example for turning off the office lamp
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Turn off the office lamp when the blind opens"
triggers:
  - trigger: cover.blind_opened
    target:
      entity_id: cover.office_blind
conditions:
  - condition: sun
    after: sunrise
actions:
  - action: light.turn_off
    target:
      entity_id: light.office_lamp

Automation: close the bedroom shutter at sunset if it is still open

At sunset, this automation checks whether the bedroom shutter is still open. If it is, Home Assistant closes it for the night.

  • Trigger: Sunset
  • Condition: Shutter is open
    • Target: Bedroom shutter
  • Action: Close cover
YAML example for closing the bedroom shutter at sunset
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Close the bedroom shutter at sunset"
triggers:
  - trigger: sun.sunset
conditions:
  - condition: cover.shutter_is_open
    target:
      entity_id: cover.bedroom_shutter
actions:
  - action: cover.close_cover
    target:
      entity_id: cover.bedroom_shutter

Known limitations

The triggers and conditions in List of triggers and List of conditions work only with cover entities that use the awning, blind, curtain, shade, or shutter device class.