Skip to content

hap-fluent / CharacteristicValue

Type Alias: CharacteristicValue

ts
type CharacteristicValue = string | number | boolean | Record<string, unknown> | null;

Defined in: packages/hap-fluent/src/type-guards.ts:142

Union of all valid HAP characteristic value types per the HAP specification.

Remarks

The HAP specification (section 6.6) defines the following data types for characteristics: bool (boolean), uint8/uint16/uint32/int (number), float (number), string (string), TLV8 and data (represented as object). null is included here to match the hap-nodejs type definition, but isCharacteristicValue rejects null at runtime to prevent HAP errors.

Released under the Apache-2.0 License.