hap-fluent / ServiceState
Type Alias: ServiceState
ts
type ServiceState = Record<string, CharacteristicValue>;Defined in: packages/hap-fluent/src/type-utils.ts:79
A flat record mapping characteristic names to their current HAP values.
Remarks
Used for bulk state snapshots and type-safe state passing. Keys should be camelCase characteristic names matching CharacteristicNames<T>.
Example
typescript
const lightState: ServiceState = {
on: true,
brightness: 75,
hue: 120,
saturation: 50
};