-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
42 lines (34 loc) · 1.02 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
declare interface BulbStatus {
power: string;
rgb: number[];
warm: number;
}
declare class BulbController {
public ip: string
constructor(ip: string);
/**
* check the status of the lemp
*/
isOnline(): Promise<boolean>;
/**
* return a promise of the returned status of the lamp
*/
getStatus(): Promise<BulbStatus>;
/**
* this function does not support version AK001-ZJ2101 of the lamps
* @param {String} rgbString a string of numbers between 0 -255 (R,G,B)
* @param {String} version a string with the version of the lamp this is optional
*/
sendRGB(rgbString: string, version?: string): Promise<void>;
/**
* this function turns on or off the lamp
* @param {boolean} isOn power status (true or false)
*/
sendPower(isOn: boolean): Promise<void>;
/**
* set the warm level of the lamp
* @param {number} level (number 0 - 255)
*/
sendWarmLevel(level: number): Promise<void>;
}
export = BulbController;