@bobfrankston/lxlan 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/device.d.ts CHANGED
@@ -48,6 +48,10 @@ export declare class LxDevice extends DeviceBase {
48
48
  * @internal
49
49
  */
50
50
  constructor(mac: string, ip?: string);
51
+ /** Brightness 0-100 (reads color.b) */
52
+ get brightness(): number;
53
+ /** Request current state (sends LIFX Get) */
54
+ requestState(): void;
51
55
  /** Get product name from product ID */
52
56
  get productName(): string;
53
57
  /** Send raw message to device */
package/device.js CHANGED
@@ -51,6 +51,10 @@ export class LxDevice extends DeviceBase {
51
51
  constructor(mac, ip) {
52
52
  super(mac, ip, LIFX_PORT);
53
53
  }
54
+ /** Brightness 0-100 (reads color.b) */
55
+ get brightness() { return this.color.b; }
56
+ /** Request current state (sends LIFX Get) */
57
+ requestState() { this.getState(); }
54
58
  /** Get product name from product ID */
55
59
  get productName() {
56
60
  return Products[this.product] ?? `Unknown (${this.product})`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/lxlan",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "LIFX LAN protocol library for device control via UDP",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@bobfrankston/colorlib": "^0.1.8",
35
- "@bobfrankston/devdefs": "^0.1.0",
35
+ "@bobfrankston/devdefs": "^0.1.2",
36
36
  "@bobfrankston/udp-transport": "^1.0.2"
37
37
  },
38
38
  "devDependencies": {