UNPKG

1.43 kBTypeScriptView Raw
1import { CharacteristicValue, Nullable } from "../../types";
2import { CharacteristicProps, Formats } from "../Characteristic";
3/**
4 * Prepares the characteristic value to be sent to the HomeKit controller.
5 * This includes changing booleans to 0 or 1 (for lower bandwidth) and converting
6 * numbers to the desired minStep (by converting them to a string).
7 * The minStep conversion only happens for minStep < 1
8 *
9 * @param value - The value which should be formatted
10 * @param props - The characteristic properties used to format the value.
11 * @private
12 * @group Utils
13 */
14export declare function formatOutgoingCharacteristicValue(value: Nullable<CharacteristicValue>, props: CharacteristicProps): Nullable<CharacteristicValue>;
15export declare function formatOutgoingCharacteristicValue(value: CharacteristicValue, props: CharacteristicProps): CharacteristicValue;
16/**
17 * @group Utils
18 */
19export declare function isNumericFormat(format: Formats | string): boolean;
20/**
21 * @group Utils
22 */
23export declare function isUnsignedNumericFormat(format: Formats | string): boolean;
24/**
25 * @group Utils
26 */
27export declare function isIntegerNumericFormat(format: Formats | string): boolean;
28/**
29 * @group Utils
30 */
31export declare function numericLowerBound(format: Formats | string): number;
32/**
33 * @group Utils
34 */
35export declare function numericUpperBound(format: Formats | string): number;
36//# sourceMappingURL=request-util.d.ts.map
\No newline at end of file