@constructorfleet/ultimate-govee
Version:
Library for interacting with Govee devices written in Typescript.
116 lines • 3.01 kB
TypeScript
import { Optional } from '../../../common';
export type PowerState = {
isOn: boolean;
};
export type BrightnessState = {
brightness: number;
};
export type ColorState = {
color: {
red: number;
green: number;
blue: number;
};
};
export type ColorTemperatureState = {
colorTemInKelvin: number;
};
export type CurrentModeState = {
mode: number;
};
export type ConnectedState = {
connected: 'true' | 'false' | boolean;
};
export type StatusCurrentTemperature = {
currentTemperature: number;
};
export type StatusSetTemperature = {
setTemperature: number;
};
export type StatusCode = {
code: string;
};
export type StatusState = {
status: Partial<StatusCurrentTemperature> & Partial<StatusSetTemperature> & Partial<StatusCode>;
};
export type OpCommand = {
command: string[];
};
export type OpMode = {
mode: string;
value: string[] | number[];
};
export type OpCodeMode = {
opCode: 'mode';
modeValue: string | string[];
};
export type OpCodeSleep = {
opCode: 'sleep';
sleepValue: string | string[];
};
export type OpCodeWakeup = {
opCode: 'wakeup';
wakeupValue: string | string[];
};
export type OpCodeTimer = {
opCode: 'timer';
timerValue: string | string[];
};
export type MessageOpType = Partial<OpCommand> | Partial<OpMode> | Partial<OpCodeMode> | Partial<OpCodeSleep> | Partial<OpCodeTimer> | Partial<OpCodeWakeup>;
export type MessageStateType = Partial<PowerState> & Partial<ConnectedState> & Partial<BrightnessState> & Partial<ColorTemperatureState> & Partial<ColorState> & Partial<CurrentModeState> & Partial<StatusState>;
export declare class StateStatus {
currentTemperature?: Optional<number>;
setTemperature?: Optional<number>;
code?: Optional<string>;
}
export declare class Color {
red: number;
green: number;
blue: number;
}
export declare class MessageState {
isOn?: Optional<boolean>;
brightness?: Optional<number>;
colorTemperature?: Optional<number>;
color?: Optional<Color>;
mode?: Optional<number>;
connected?: Optional<boolean>;
status?: StateStatus;
}
export declare class MessageData {
op: string;
value: string;
}
export declare class MessageOp {
command?: number[][];
mode?: string;
value?: string | string[];
opCode?: string;
modeValue?: string;
sleepValue?: string;
timerValue?: string;
wakeupValue?: string;
}
export declare class IoTMessage {
proType: number;
model: string;
deviceId: string;
softwareVersion?: string;
wifiSoftwareVersion?: string;
command: string;
type: 0;
transaction: string;
pactType: number;
pactCode: number;
op?: MessageOp;
state: MessageState;
battery?: number;
leakDetected?: 'true' | 'false' | boolean;
temperature?: number;
temperatureF?: number;
humidity?: number;
commands?: string[];
bulb?: string | string[];
data?: MessageData;
}
//# sourceMappingURL=iot-message.d.ts.map