presence
Presence cap.
Presence cap. Models HA person.* and device_tracker.* entities on DeviceType.Presence. Read-only — no setters: presence is derived from upstream signals (mobile-app location, router DHCP lease, Bluetooth beacon, manual zone change) and pushed into the slice.
state follows HA's canonical values — home / not_home / <zone-name> for any other named zone. The zone name is freeform because users define arbitrary zones (work, gym, school).
GPS coordinates are nullable — tracker types without location (Bluetooth scanner, MQTT presence) omit them. The presence of GPS data is signaled by DeviceFeature.PresenceGps for fast UI map-pin rendering.
At a glance
| Capability | presence |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | presence |
| Source | packages/types/src/capabilities/presence.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.
Runtime-state slice — mirrored by the kernel. UI presence card reads state + location for the text label; iff gps !== null the map pin is rendered (use DeviceFeature.PresenceGps for the pre-fetch fast-path check).
| Field | Type | Required | Description |
|---|---|---|---|
state | string | yes | home / not_home / any user-defined zone name. |
location | string | null | yes | Optional textual location label (zone name, city, address). Null when only the binary state is known. |
gps | { latitude: number; longitude: number; accuracyMeters: number } | null | yes | GPS coordinates when available. Null otherwise. |
lastChangedAt | number | yes | Ms epoch when the slice was last updated. |