Cover / shade
Domain cover: states, services, device classes and features.
Entity ids in this domain look like cover.<object_id>.
Use in preferences
{ key: 'device', label: 'Device', type: 'entity', domainFilter: 'cover', required: true }States
getState() returns the raw token. subscribe filters, entity.is() and matchesState() also accept the friendly label the app shows (any case; spaces, hyphens and underscores interchangeable).
| Device class | open | closed | opening | closing |
|---|---|---|---|---|
| any | Open | Closed | Opening | Closing |
garage | Open | Closed | Opening | Closing |
blind | Open | Closed | Opening | Closing |
shade | Open | Closed | Opening | Closing |
subscribe($g.device, { to: 'open' }, onChange);
subscribe($g.device, { to: 'Open' }, onChange); // same thing, by label
if ($g.device.is('Open')) { /* … */ }Services
Curated for smart apps (also offered by the wizard action catalog):
| Service | Parameters | Description |
|---|---|---|
closeCover | — | Close |
openCover | — | Open |
setCoverPosition | position (number, 0–100, required) | Set position |
stopCover | — | Stop |
toggle | — | Toggle |
await $g.device.closeCover();Also routable (CoverServices), not in the wizard catalog — callable as entity.<service>(); the integration may reject unsupported ones at runtime:
closeCoverTilt, openCoverTilt, setCoverTiltPosition, stopCoverTilt, toggleTilt
Device classes
none, garage, blind, shade
Filter with deviceClassFilter in an entity input.
Features
Bitmask on the supportedFeatures attribute; read the values with getEntityFeatures().Cover.
| Feature | Bit |
|---|---|
OPEN | 1 |
CLOSE | 2 |
SET_POSITION | 4 |
STOP | 8 |
OPEN_TILT | 16 |
CLOSE_TILT | 32 |
STOP_TILT | 64 |
SET_TILT_POSITION | 128 |
Attributes
| Attribute | Type | Description |
|---|---|---|
currentPosition | number | 0 = closed, 100 = open. |
currentTiltPosition | number | — |
supportedFeatures | number | Bitmask of the cover feature bits. |