@constructorfleet/ultimate-govee
Version:
Library for interacting with Govee devices written in Typescript.
96 lines • 3.74 kB
TypeScript
import { DeviceModel } from '../../../devices.model';
import { DeviceOpState, DeviceState } from '../../../states/device.state';
import { Optional } from '../../../../../common';
import { LightEffect, LightEffectState, ModeState, StateCommandAndStatus } from '../../../states';
export declare const AmbiantStateName: 'ambiant';
export type AmbiantStateName = typeof AmbiantStateName;
export declare enum BrightnessMode {
CONSISTENT = "CONSISTENT",
SEGMENT = "SEGMENT"
}
export type AmbiantData = {
on?: boolean;
brightnessMode?: BrightnessMode;
brigness?: number;
};
export declare class AmbiantState extends DeviceOpState<AmbiantStateName, AmbiantData> {
constructor(device: DeviceModel);
parseOpCommand(opCommand: number[]): void;
}
export declare enum SyncBoxModes {
VIDEO = 0,
MUSIC = 19,
SCENE = 1,
COLOR = 21,
DIY = 10
}
export declare const MicModeStateName: 'micMode';
export type MicModeStateName = typeof MicModeStateName;
export type MicMode = {
micScene?: string;
micSceneId?: number;
sensitivity?: number;
calm?: boolean;
autoColor?: boolean;
color?: {
red: number;
blue: number;
green: number;
};
};
export declare class MicModeState extends DeviceOpState<MicModeStateName, MicMode> {
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: MicMode) => Optional<StateCommandAndStatus>;
}
export declare class SceneModeState extends LightEffectState {
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: LightEffect) => Optional<StateCommandAndStatus>;
}
export declare const VideoModeStateName: 'videoMode';
export type VideoModeStateName = typeof VideoModeStateName;
export type VideoData = {
brightness?: number;
};
export declare class VideoModeState extends DeviceOpState<VideoModeStateName, VideoData> {
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (nextState: VideoData) => Optional<StateCommandAndStatus>;
}
export declare const DIYModeStateName: 'diyMode';
export type DIYModeStateName = typeof DIYModeStateName;
export type DIYModeData = {
code?: number;
name?: string;
};
export declare class DIYModeState extends DeviceOpState<DIYModeStateName, DIYModeData> {
constructor(device: DeviceModel);
parseOpCommand(opCommand: number[]): void;
protected readonly stateToCommand: (state: DIYModeData) => Optional<StateCommandAndStatus>;
}
export declare const SegmentColorModeStateName: 'segmentColorMode';
export type SegmentColorModeStateName = typeof SegmentColorModeStateName;
type Color = {
red: number;
green: number;
blue: number;
};
export type Segment = {
id?: number;
brightness?: number;
color?: Color;
};
export declare class SegmentColorModeState extends DeviceOpState<SegmentColorModeStateName, Segment[]> {
private segments;
constructor(device: DeviceModel, opType?: number, identifier?: number[]);
parseMultiOpCommand(opCommands: number[][]): void;
protected readonly stateToCommand: (nextState: Segment[]) => Optional<StateCommandAndStatus>;
}
export declare class SyncBoxActiveState extends ModeState {
constructor(device: DeviceModel, states: Optional<DeviceState<string, any>>[]);
protected readonly stateToCommand: () => undefined;
setState(nextState: Optional<DeviceState<string, unknown>>): string[];
}
export {};
//# sourceMappingURL=sync-box.states.d.ts.map