A custom Home Assistant badge to control shutter directly from the dashboard.
-
Display a badge with a customizable label, icon, and color.
-
Control the shutter's up and down movements by toggling associated switch entities.
-
Automatically stops the shutter after a configurable duration (in seconds) for full open or close.
To use this custom badge, you need to load the JavaScript file into your Home Assistant instance:
-
Open the Dashboard Settings (three-dot menu in the top-right corner of your dashboard).
-
Select Resources.
-
Add the following resource:
URL: https://cdn.jsdelivr.net/gh/gevgeny/shutter-badge@1.0.0/source/shutter-badge.js Type: JavaScript Module
-
Save and refresh the page.
To use the shutter-badge
on your Home Assistant dashboard, follow these steps:
-
Open Your Dashboard in Edit Mode
-
Click the Add Badge
[+]
button. -
Scroll to the bottom and select Manual.
-
Paste the following YAML into the card editor and customize it for your needs
- type: custom:shutter-badge
label: Shutter
icon: mdi:window-shutter
color: var(--orange-color)
switch_up: switch.shellyplus2pm_2cbcaa388f54_switch_0
switch_down: switch.shellyplus2pm_2cbcaa388f54_switch_1
duration: 10
Option | Type | Required | Default | Description |
---|---|---|---|---|
label |
string |
No | Shutter |
Label to display on the badge. |
icon |
string |
No | mdi:window-shutter |
Material Design icon for the badge. |
color |
string |
No | var(--primary-color) |
Badge color (CSS color or variable). |
switch_up |
string |
Yes | - | Entity ID of the switch controlling the UP direction. |
switch_down |
string |
Yes | - | Entity ID of the switch controlling the DOWN direction. |
duration |
number |
No | 10 |
Time in seconds to keep the switch on for full open/close. |
This project is open-source and available under the MIT License.
Enjoy seamless shutter control with your Home Assistant dashboard!