A custom Home Assistant badge to control shutters directly from the dashboard.
Designed for relay-based shutter controllers like Shelly 2PM — where UP and DOWN are two separate switch entities rather than a single cover entity.
- Compact by default, controls on hover. Badge shows current direction and pulses when active. Hover reveals Up/Down buttons.
- Timed auto-stop. Press Up or Down — the switch turns on for a configurable duration (e.g. 10 s for full travel), then turns off automatically. Press again to stop early.
- Group multiple shutters under one badge. Pass a comma-separated list of entity IDs to control all shutters in a room or zone with a single tap — useful for "close all bedroom shutters" or "open all south-facing blinds."
- Customizable appearance. Label, icon, and color adapt to your dashboard theme.
-
Open Dashboard Settings (three-dot menu, top-right).
-
Select Resources.
-
Add the resource:
URL: https://cdn.jsdelivr.net/gh/gevgeny/shutter-badge@1.1.0/source/shutter-badge.js Type: JavaScript Module
-
Save and refresh the page.
- Open your dashboard in Edit Mode.
- Click the Add Badge [+] button.
- Scroll to the bottom and select Manual.
- Paste the YAML below and customize it.
Single shutter:
type: custom:shutter-badge
label: Shutter
icon: mdi:window-shutter
color: var(--orange-color)
switch_up: switch.shellyplus2pm_switch_0
switch_down: switch.shellyplus2pm_switch_1
duration: 10Multiple shutters under one badge:
type: custom:shutter-badge
label: All Shutters
icon: mdi:window-shutter
color: var(--orange-color)
switch_up: switch.shutter1_up, switch.shutter2_up, switch.shutter3_up
switch_down: switch.shutter1_down, switch.shutter2_down, switch.shutter3_down
duration: 10| Option | Type | Required | Default | Description |
|---|---|---|---|---|
label |
string |
No | Shutter |
Label displayed on the badge. |
icon |
string |
No | — | Material Design icon (e.g. mdi:window-shutter). |
color |
string |
No | var(--primary-color) |
Badge color — CSS value or variable. |
switch_up |
string |
Yes | — | Entity ID(s) for the UP direction. Comma-separate for multiple. |
switch_down |
string |
Yes | — | Entity ID(s) for the DOWN direction. Comma-separate for multiple. |
duration |
number |
No | 10 |
Seconds to keep the switch on for a full open/close. |
This project is open-source and available under the MIT License.
