ReferenceDevice capabilities
enum-sensor
Enum-state sensor — a string value picked from a finite option set.
Enum-state sensor — a string value picked from a finite option set. Drives HA sensor entries with state_class: enum (HVAC action states, weather conditions, contact-source channels, mode strings). The option set is stable across observations; it is persisted in the device config blob (via the control slice at adoption) and is NOT stored in sourceInfo.
Locale-render shape for an ISO value carried by a DateTimeSensor-role enum sensor: date (date-only), time (time-only), datetime (both).
At a glance
| Capability | enum-sensor |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | sensor |
| Source | packages/types/src/capabilities/enum-sensor.cap.ts |
Methods
This capability declares no methods.
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
value | string | yes | |
timestamp | boolean | no | Set when value is a timestamp rather than an enum state, so history does not learn ISO strings as states. The display shape (date / time / datetime) lives on SourceInfo.dateTimeShape, written once at adopt. |
lastFetchedAt | number | yes | Ms epoch when the slice was last updated. |