import type { LockModel } from '../settings.js'; import { Buffer } from 'node:buffer'; import { WoSmartLockPro } from './wo-lock-pro.js'; /** * Action of the Lock Ultra Quick Key: the 2-bit function field of the Quick Key config byte * (pySwitchbot QuickKeyFunction) */ export declare enum QuickKeyFunction { LockOnly = 0, UnlockOnly = 1, LockAndUnlock = 2 } /** Lock Ultra Quick Key and basic property settings */ export interface QuickKeySettings { /** The config byte as received */ raw: number; light: boolean; sound: boolean; manualUnlockLinkage: boolean; /** Quick Key enabled */ enabled: boolean; /** Quick Key triggers on a double press instead of a single press */ doublePress: boolean; /** undefined for an unknown function value */ function?: QuickKeyFunction; /** 0 high, 1 normal, 2 quiet; undefined when the reply does not include it */ motorSpeed?: number; } /** Quick Key settings to change; settings left undefined are not changed */ export interface QuickKeyUpdate { light?: boolean; sound?: boolean; manualUnlockLinkage?: boolean; enabled?: boolean; doublePress?: boolean; function?: QuickKeyFunction; /** 0 high, 1 normal, 2 quiet, or 0xFF (default) to keep the current speed */ motorSpeed?: 0 | 1 | 2 | 0xFF; } /** Decode the Quick Key config byte (pySwitchbot `_parse_quick_key`) */ export declare function parseQuickKeyConfig(config: number): QuickKeySettings; /** * Build the Quick Key write command (pySwitchbot `set_quick_key`): * `57 0f 4e 04 01 00 `. Each set bit of the update byte selects that * property for writing. */ export declare function buildQuickKeyCommand(update: QuickKeyUpdate): Buffer; /** * Lock Ultra, Lock Ultra Max and UWB Lock. They share Lock Pro's commands with their own lock * model byte; the Lock Ultra adds half lock and the Quick Key. */ export declare class WoSmartLockUltra extends WoSmartLockPro { protected readonly defaultLockModel: LockModel; /** * Half lock (Lock Ultra only) */ halfLock(): Promise; private assertQuickKeySupported; /** * Read the Quick Key and basic property settings (Lock Ultra only, BLE only). * Returns undefined when the lock rejects the request or the reply has no config byte. */ getQuickKey(): Promise; /** * Change any combination of Quick Key and basic property settings (Lock Ultra only, BLE only). * Returns true when the lock accepts the command and its reply confirms every requested * setting. The motor speed is confirmed by the status byte only. */ setQuickKey(update: QuickKeyUpdate): Promise; } //# sourceMappingURL=wo-lock-ultra.d.ts.map