@constructorfleet/ultimate-govee
Version:
Library for interacting with Govee devices written in Typescript.
46 lines • 2.33 kB
TypeScript
import { Optional } from '../../../../../common';
import { DeviceModel } from '../../../devices.model';
import { ModeState, DeviceOpState, DeviceState, HumidityState, StateCommandAndStatus } from '../../../states';
export declare const ManualModeStateName: 'manualMode';
export type ManualModeStateName = typeof ManualModeStateName;
export declare class ManualModeState extends DeviceOpState<ManualModeStateName, Optional<number>> {
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: Optional<number>) => Optional<StateCommandAndStatus>;
}
export declare const CustomModeStateName: 'customMode';
export type CustomModeStateName = typeof CustomModeStateName;
export type CustomProgram = {
id: number;
mistLevel: number;
duration: number;
remaining: number;
};
export type CustomMode = {
currentProgramId?: number;
programs?: Record<number, CustomProgram>;
currentProgram?: CustomProgram;
};
export declare class CustomModeState extends DeviceOpState<CustomModeStateName, Optional<CustomProgram>> {
private customModes;
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: Optional<CustomProgram>) => Optional<StateCommandAndStatus>;
}
export declare const AutoModeStateName: 'autoMode';
export type AutoModeStateName = typeof AutoModeStateName;
export type AutoMode = {
targetHumidity?: number;
};
export declare class AutoModeState extends DeviceOpState<AutoModeStateName, AutoMode> {
readonly humidityState?: HumidityState | undefined;
constructor(device: DeviceModel, humidityState?: HumidityState | undefined, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: Optional<AutoMode>) => Optional<StateCommandAndStatus>;
}
export declare class HumidifierActiveState extends ModeState {
constructor(device: DeviceModel, states: Optional<DeviceState<string, any>>[]);
protected readonly stateToCommand: () => undefined;
setState(nextState: Optional<DeviceState<string, unknown>>): string[];
}
//# sourceMappingURL=humidifier.modes.d.ts.map