homebridge-tapo 1.5.1 → 1.5.2-beta7

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.
Files changed (108) hide show
  1. package/README.md +1 -1
  2. package/dist/config.d.ts +0 -1
  3. package/dist/config.js +6 -11
  4. package/dist/config.js.map +1 -1
  5. package/dist/custom-characteristics/currentConsumptionCharacteristic.d.ts +0 -1
  6. package/dist/custom-characteristics/currentConsumptionCharacteristic.js +15 -20
  7. package/dist/custom-characteristics/currentConsumptionCharacteristic.js.map +1 -1
  8. package/dist/custom-characteristics/default-characteristic.d.ts +0 -1
  9. package/dist/custom-characteristics/default-characteristic.js +1 -4
  10. package/dist/custom-characteristics/default-characteristic.js.map +1 -1
  11. package/dist/custom-characteristics/index.d.ts +0 -1
  12. package/dist/custom-characteristics/index.js +7 -13
  13. package/dist/custom-characteristics/index.js.map +1 -1
  14. package/dist/custom-characteristics/resetConsumptionCharacteristic.d.ts +0 -1
  15. package/dist/custom-characteristics/resetConsumptionCharacteristic.js +14 -19
  16. package/dist/custom-characteristics/resetConsumptionCharacteristic.js.map +1 -1
  17. package/dist/custom-characteristics/totalConsumptionCharacteristic.d.ts +0 -1
  18. package/dist/custom-characteristics/totalConsumptionCharacteristic.js +15 -20
  19. package/dist/custom-characteristics/totalConsumptionCharacteristic.js.map +1 -1
  20. package/dist/homekit-device/types.d.ts +0 -1
  21. package/dist/homekit-device/types.js +1 -2
  22. package/dist/index.d.ts +1 -2
  23. package/dist/index.js +7 -8
  24. package/dist/index.js.map +1 -1
  25. package/dist/platform.d.ts +2 -3
  26. package/dist/platform.js +38 -35
  27. package/dist/platform.js.map +1 -1
  28. package/dist/platformL510EAccessory.d.ts +3 -4
  29. package/dist/platformL510EAccessory.js +9 -11
  30. package/dist/platformL510EAccessory.js.map +1 -1
  31. package/dist/platformL520EAccessory.d.ts +3 -4
  32. package/dist/platformL520EAccessory.js +9 -11
  33. package/dist/platformL520EAccessory.js.map +1 -1
  34. package/dist/platformL530Accessory.d.ts +3 -5
  35. package/dist/platformL530Accessory.js +31 -25
  36. package/dist/platformL530Accessory.js.map +1 -1
  37. package/dist/platformP100Accessory.d.ts +3 -4
  38. package/dist/platformP100Accessory.js +9 -11
  39. package/dist/platformP100Accessory.js.map +1 -1
  40. package/dist/platformP110Accessory.d.ts +3 -4
  41. package/dist/platformP110Accessory.js +20 -13
  42. package/dist/platformP110Accessory.js.map +1 -1
  43. package/dist/platformTPLinkAccessory.d.ts +3 -5
  44. package/dist/platformTPLinkAccessory.js +11 -7
  45. package/dist/platformTPLinkAccessory.js.map +1 -1
  46. package/dist/settings.d.ts +0 -1
  47. package/dist/settings.js +2 -5
  48. package/dist/settings.js.map +1 -1
  49. package/dist/utils/energyUsage.d.ts +0 -1
  50. package/dist/utils/energyUsage.js +2 -5
  51. package/dist/utils/energyUsage.js.map +1 -1
  52. package/dist/utils/l510e.d.ts +2 -3
  53. package/dist/utils/l510e.js +8 -8
  54. package/dist/utils/l510e.js.map +1 -1
  55. package/dist/utils/l520e.d.ts +2 -3
  56. package/dist/utils/l520e.js +8 -8
  57. package/dist/utils/l520e.js.map +1 -1
  58. package/dist/utils/l530.d.ts +4 -4
  59. package/dist/utils/l530.js +22 -12
  60. package/dist/utils/l530.js.map +1 -1
  61. package/dist/utils/newTpLinkCipher.d.ts +2 -4
  62. package/dist/utils/newTpLinkCipher.js +18 -11
  63. package/dist/utils/newTpLinkCipher.js.map +1 -1
  64. package/dist/utils/p100.d.ts +9 -8
  65. package/dist/utils/p100.js +161 -102
  66. package/dist/utils/p100.js.map +1 -1
  67. package/dist/utils/p110.d.ts +3 -4
  68. package/dist/utils/p110.js +10 -10
  69. package/dist/utils/p110.js.map +1 -1
  70. package/dist/utils/powerUsage.d.ts +1 -2
  71. package/dist/utils/powerUsage.js +4 -5
  72. package/dist/utils/powerUsage.js.map +1 -1
  73. package/dist/utils/tpLinkCipher.d.ts +3 -4
  74. package/dist/utils/tpLinkCipher.js +8 -7
  75. package/dist/utils/tpLinkCipher.js.map +1 -1
  76. package/dist/utils/tplinkAccessory.d.ts +4 -5
  77. package/dist/utils/tplinkAccessory.js +1 -2
  78. package/dist/utils/usage.d.ts +0 -1
  79. package/dist/utils/usage.js +4 -5
  80. package/dist/utils/usage.js.map +1 -1
  81. package/package.json +13 -8
  82. package/dist/config.d.ts.map +0 -1
  83. package/dist/custom-characteristics/currentConsumptionCharacteristic.d.ts.map +0 -1
  84. package/dist/custom-characteristics/default-characteristic.d.ts.map +0 -1
  85. package/dist/custom-characteristics/index.d.ts.map +0 -1
  86. package/dist/custom-characteristics/resetConsumptionCharacteristic.d.ts.map +0 -1
  87. package/dist/custom-characteristics/totalConsumptionCharacteristic.d.ts.map +0 -1
  88. package/dist/homekit-device/types.d.ts.map +0 -1
  89. package/dist/index.d.ts.map +0 -1
  90. package/dist/platform.d.ts.map +0 -1
  91. package/dist/platformL510EAccessory.d.ts.map +0 -1
  92. package/dist/platformL520EAccessory.d.ts.map +0 -1
  93. package/dist/platformL530Accessory.d.ts.map +0 -1
  94. package/dist/platformP100Accessory.d.ts.map +0 -1
  95. package/dist/platformP110Accessory.d.ts.map +0 -1
  96. package/dist/platformTPLinkAccessory.d.ts.map +0 -1
  97. package/dist/settings.d.ts.map +0 -1
  98. package/dist/utils/energyUsage.d.ts.map +0 -1
  99. package/dist/utils/l510e.d.ts.map +0 -1
  100. package/dist/utils/l520e.d.ts.map +0 -1
  101. package/dist/utils/l530.d.ts.map +0 -1
  102. package/dist/utils/newTpLinkCipher.d.ts.map +0 -1
  103. package/dist/utils/p100.d.ts.map +0 -1
  104. package/dist/utils/p110.d.ts.map +0 -1
  105. package/dist/utils/powerUsage.d.ts.map +0 -1
  106. package/dist/utils/tpLinkCipher.d.ts.map +0 -1
  107. package/dist/utils/tplinkAccessory.d.ts.map +0 -1
  108. package/dist/utils/usage.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  <p align="center">
3
3
 
4
- <img src="https://github.com/homebridge/branding/raw/master/logos/homebridge-wordmark-logo-vertical.png" width="150">
4
+ <img src="https://github.com/homebridge/branding/raw/latest/logos/homebridge-wordmark-logo-vertical.png" width="150">
5
5
 
6
6
  </p>
7
7
 
package/dist/config.d.ts CHANGED
@@ -83,4 +83,3 @@ export type TapoConfig = {
83
83
  export declare const defaultConfig: TapoConfigDefault;
84
84
  export declare function parseConfig(config: Record<string, unknown>): TapoConfig;
85
85
  export {};
86
- //# sourceMappingURL=config.d.ts.map
package/dist/config.js CHANGED
@@ -1,11 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseConfig = exports.defaultConfig = void 0;
7
- const lodash_defaults_1 = __importDefault(require("lodash.defaults"));
8
- exports.defaultConfig = {
1
+ import defaults from 'lodash.defaults';
2
+ export const defaultConfig = {
9
3
  name: 'Tapo Smart Platform',
10
4
  username: '',
11
5
  password: '',
@@ -14,8 +8,8 @@ exports.defaultConfig = {
14
8
  timeout: 15,
15
9
  waitTimeUpdate: 100,
16
10
  };
17
- function parseConfig(config) {
18
- const c = (0, lodash_defaults_1.default)(config, exports.defaultConfig);
11
+ export function parseConfig(config) {
12
+ const c = defaults(config, defaultConfig);
19
13
  const defaultSendOptions = {
20
14
  timeout: c.timeout * 1000,
21
15
  };
@@ -30,9 +24,10 @@ function parseConfig(config) {
30
24
  deviceOptions: {
31
25
  defaultSendOptions,
32
26
  },
27
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
28
+ //@ts-ignore
33
29
  devices: c.devices,
34
30
  },
35
31
  };
36
32
  }
37
- exports.parseConfig = parseConfig;
38
33
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAkF1B,QAAA,aAAa,GAAsB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,CAAC,CAAC,OAAO,GAAG,IAAI;KAC1B,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,cAAc,EAAE,CAAC,CAAC,cAAc;QAEhC,kBAAkB;QAElB,gBAAgB,EAAE;YAChB,iBAAiB,EAAE,CAAC,CAAC,eAAe,GAAG,IAAI;YAC3C,aAAa,EAAE;gBACb,kBAAkB;aACnB;YACD,6DAA6D;YAC7D,YAAY;YACZ,OAAO,EAAE,CAAC,CAAC,OAAO;SACnB;KACF,CAAC;AACJ,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import { Characteristic, WithUUID } from 'homebridge';
2
2
  export default function currentConsumption(DefaultCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic>;
3
- //# sourceMappingURL=currentConsumptionCharacteristic.d.ts.map
@@ -1,23 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function currentConsumption(DefaultCharacteristic) {
4
- var _a;
5
- return _a = class CurrentConsumptionCharacteristic extends DefaultCharacteristic {
6
- constructor() {
1
+ export default function currentConsumption(DefaultCharacteristic) {
2
+ return class CurrentConsumptionCharacteristic extends DefaultCharacteristic {
3
+ static UUID = 'E863F10D-079E-48FF-8F27-9C2605A29F52';
4
+ constructor() {
5
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
+ // @ts-ignore: unable to override class constructor parameters as its a type and not a value
7
+ super('Current Consumption', CurrentConsumptionCharacteristic.UUID, {
7
8
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
- // @ts-ignore: unable to override class constructor parameters as its a type and not a value
9
- super('Current Consumption', CurrentConsumptionCharacteristic.UUID, {
10
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11
- // @ts-ignore: custom unit
12
- unit: 'Watt',
13
- maxValue: 65535,
14
- minValue: 0,
15
- minStep: 1,
16
- });
17
- }
18
- },
19
- _a.UUID = 'E863F10D-079E-48FF-8F27-9C2605A29F52',
20
- _a;
9
+ // @ts-ignore: custom unit
10
+ unit: 'Watt',
11
+ maxValue: 65535,
12
+ minValue: 0,
13
+ minStep: 1,
14
+ });
15
+ }
16
+ };
21
17
  }
22
- exports.default = currentConsumption;
23
18
  //# sourceMappingURL=currentConsumptionCharacteristic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"currentConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/currentConsumptionCharacteristic.ts"],"names":[],"mappings":";;AAEA,SAAwB,kBAAkB,CACxC,qBAA4C;;IAE5C,YAAO,MAAM,gCAAiC,SAAQ,qBAAqB;YAGzE;gBACE,6DAA6D;gBAC7D,4FAA4F;gBAC5F,KAAK,CAAC,qBAAqB,EAAE,gCAAgC,CAAC,IAAI,EAAE;oBAClE,6DAA6D;oBAC7D,0BAA0B;oBAC1B,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,CAAC;oBACX,OAAO,EAAE,CAAC;iBACX,CAAC,CAAC;YACL,CAAC;SACF;QAdiB,OAAI,GAAG,sCAAuC;WAc9D;AACJ,CAAC;AAnBD,qCAmBC"}
1
+ {"version":3,"file":"currentConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/currentConsumptionCharacteristic.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,qBAA4C;IAE5C,OAAO,MAAM,gCAAiC,SAAQ,qBAAqB;QACzE,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,6DAA6D;YAC7D,4FAA4F;YAC5F,KAAK,CAAC,qBAAqB,EAAE,gCAAgC,CAAC,IAAI,EAAE;gBAClE,6DAA6D;gBAC7D,0BAA0B;gBAC1B,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,KAAK;gBACf,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC;aACX,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import type { Characteristic as CharacteristicClass } from 'homebridge';
2
2
  export default function defaultCharacteristic(Characteristic: typeof CharacteristicClass): typeof CharacteristicClass;
3
- //# sourceMappingURL=default-characteristic.d.ts.map
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function defaultCharacteristic(Characteristic) {
1
+ export default function defaultCharacteristic(Characteristic) {
4
2
  return class DefaultCharacteristic extends Characteristic {
5
3
  constructor(displayName, UUID, props) {
6
4
  const combinedProps = {
@@ -15,5 +13,4 @@ function defaultCharacteristic(Characteristic) {
15
13
  }
16
14
  };
17
15
  }
18
- exports.default = defaultCharacteristic;
19
16
  //# sourceMappingURL=default-characteristic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-characteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/default-characteristic.ts"],"names":[],"mappings":";;AAQA,SAAwB,qBAAqB,CAC3C,cAA0C;IAE1C,OAAO,MAAM,qBAAsB,SAAQ,cAAc;QACvD,YACE,WAAmB,EACnB,IAAY,EACZ,KAA6D;YAE7D,MAAM,aAAa,GAAG;gBACpB,MAAM,6BAAe;gBACrB,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,KAAK;gBACf,KAAK,EAAE,uDAAiC;gBACxC,GAAG,KAAK;aACT,CAAC;YACF,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC;AApBD,wCAoBC"}
1
+ {"version":3,"file":"default-characteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/default-characteristic.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAA0C;IAE1C,OAAO,MAAM,qBAAsB,SAAQ,cAAc;QACvD,YACE,WAAmB,EACnB,IAAY,EACZ,KAA6D;YAE7D,MAAM,aAAa,GAAG;gBACpB,MAAM,6BAAe;gBACrB,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,KAAK;gBACf,KAAK,EAAE,uDAAiC;gBACxC,GAAG,KAAK;aACT,CAAC;YACF,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import type { Characteristic as CharacteristicClass, WithUUID } from 'homebridge';
2
2
  export default function characteristic(Characteristic: typeof CharacteristicClass): Record<'CurrentConsumptionCharacteristic' | 'TotalConsumptionCharacteristic', WithUUID<new () => CharacteristicClass>>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,17 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const default_characteristic_1 = __importDefault(require("./default-characteristic"));
7
- const currentConsumptionCharacteristic_1 = __importDefault(require("./currentConsumptionCharacteristic"));
8
- const totalConsumptionCharacteristic_1 = __importDefault(require("./totalConsumptionCharacteristic"));
9
- function characteristic(Characteristic) {
10
- const DefaultCharacteristic = (0, default_characteristic_1.default)(Characteristic);
1
+ import DefaultCharacteristicImport from './default-characteristic.js';
2
+ import CurrentConsumptionCharacteristicImport from './currentConsumptionCharacteristic.js';
3
+ import TotalConsumptionCharacteristicImport from './totalConsumptionCharacteristic.js';
4
+ export default function characteristic(Characteristic) {
5
+ const DefaultCharacteristic = DefaultCharacteristicImport(Characteristic);
11
6
  return {
12
- CurrentConsumptionCharacteristic: (0, currentConsumptionCharacteristic_1.default)(DefaultCharacteristic),
13
- TotalConsumptionCharacteristic: (0, totalConsumptionCharacteristic_1.default)(DefaultCharacteristic),
7
+ CurrentConsumptionCharacteristic: CurrentConsumptionCharacteristicImport(DefaultCharacteristic),
8
+ TotalConsumptionCharacteristic: TotalConsumptionCharacteristicImport(DefaultCharacteristic),
14
9
  };
15
10
  }
16
- exports.default = characteristic;
17
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/custom-characteristics/index.ts"],"names":[],"mappings":";;;;;AAKA,sFAAmE;AACnE,0GAAwF;AACxF,sGAAoF;AAEpF,SAAwB,cAAc,CACpC,cAA0C;IAM1C,MAAM,qBAAqB,GAAG,IAAA,gCAA2B,EAAC,cAAc,CAAC,CAAC;IAE1E,OAAO;QACL,gCAAgC,EAAE,IAAA,0CAAsC,EAAC,qBAAqB,CAAC;QAC/F,8BAA8B,EAAE,IAAA,wCAAoC,EAAC,qBAAqB,CAAC;KAC5F,CAAC;AACJ,CAAC;AAbD,iCAaC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/custom-characteristics/index.ts"],"names":[],"mappings":"AAKA,OAAO,2BAA2B,MAAM,6BAA6B,CAAC;AACtE,OAAO,sCAAsC,MAAM,uCAAuC,CAAC;AAC3F,OAAO,oCAAoC,MAAM,qCAAqC,CAAC;AAEvF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,cAA0C;IAM1C,MAAM,qBAAqB,GAAG,2BAA2B,CAAC,cAAc,CAAC,CAAC;IAE1E,OAAO;QACL,gCAAgC,EAAE,sCAAsC,CAAC,qBAAqB,CAAC;QAC/F,8BAA8B,EAAE,oCAAoC,CAAC,qBAAqB,CAAC;KAC5F,CAAC;AACJ,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import { Characteristic, WithUUID } from 'homebridge';
2
2
  export default function resetConsumption(DefaultCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic>;
3
- //# sourceMappingURL=resetConsumptionCharacteristic.d.ts.map
@@ -1,22 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function resetConsumption(DefaultCharacteristic) {
4
- var _a;
5
- return _a = class ResetConsumptionCharacteristic extends DefaultCharacteristic {
6
- constructor() {
1
+ export default function resetConsumption(DefaultCharacteristic) {
2
+ return class ResetConsumptionCharacteristic extends DefaultCharacteristic {
3
+ static UUID = 'E863F112-079E-48FF-8F27-9C2605A29F52';
4
+ constructor() {
5
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
+ // @ts-ignore: unable to override class constructor parameters as its a type and not a value
7
+ super('Reset Total', ResetConsumptionCharacteristic.UUID, {
7
8
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
- // @ts-ignore: unable to override class constructor parameters as its a type and not a value
9
- super('Reset Total', ResetConsumptionCharacteristic.UUID, {
10
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11
- // @ts-ignore: custom unit
12
- format: "uint32" /* Formats.UINT32 */,
13
- unit: "seconds" /* Units.SECONDS */,
14
- perms: ["pr" /* Perms.PAIRED_READ */, "ev" /* Perms.NOTIFY */, "pw" /* Perms.PAIRED_WRITE */],
15
- });
16
- }
17
- },
18
- _a.UUID = 'E863F112-079E-48FF-8F27-9C2605A29F52',
19
- _a;
9
+ // @ts-ignore: custom unit
10
+ format: "uint32" /* Formats.UINT32 */,
11
+ unit: "seconds" /* Units.SECONDS */,
12
+ perms: ["pr" /* Perms.PAIRED_READ */, "ev" /* Perms.NOTIFY */, "pw" /* Perms.PAIRED_WRITE */],
13
+ });
14
+ }
15
+ };
20
16
  }
21
- exports.default = resetConsumption;
22
17
  //# sourceMappingURL=resetConsumptionCharacteristic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resetConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/resetConsumptionCharacteristic.ts"],"names":[],"mappings":";;AAEA,SAAwB,gBAAgB,CACtC,qBAA4C;;IAE5C,YAAO,MAAM,8BAA+B,SAAQ,qBAAqB;YAGvE;gBACE,6DAA6D;gBAC7D,4FAA4F;gBAC5F,KAAK,CAAC,aAAa,EAAE,8BAA8B,CAAC,IAAI,EAAE;oBACxD,6DAA6D;oBAC7D,0BAA0B;oBAC1B,MAAM,+BAAgB;oBACtB,IAAI,+BAAe;oBACnB,KAAK,EAAE,sFAAqD;iBAC7D,CAAC,CAAC;YACL,CAAC;SACF;QAbiB,OAAI,GAAG,sCAAuC;WAa9D;AACJ,CAAC;AAlBD,mCAkBC"}
1
+ {"version":3,"file":"resetConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/resetConsumptionCharacteristic.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,qBAA4C;IAE5C,OAAO,MAAM,8BAA+B,SAAQ,qBAAqB;QACvE,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,6DAA6D;YAC7D,4FAA4F;YAC5F,KAAK,CAAC,aAAa,EAAE,8BAA8B,CAAC,IAAI,EAAE;gBACxD,6DAA6D;gBAC7D,0BAA0B;gBAC1B,MAAM,+BAAgB;gBACtB,IAAI,+BAAe;gBACnB,KAAK,EAAE,sFAAqD;aAC7D,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import { Characteristic, WithUUID } from 'homebridge';
2
2
  export default function totalConsumption(DefaultCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic>;
3
- //# sourceMappingURL=totalConsumptionCharacteristic.d.ts.map
@@ -1,23 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function totalConsumption(DefaultCharacteristic) {
4
- var _a;
5
- return _a = class TotalConsumptionCharacteristic extends DefaultCharacteristic {
6
- constructor() {
1
+ export default function totalConsumption(DefaultCharacteristic) {
2
+ return class TotalConsumptionCharacteristic extends DefaultCharacteristic {
3
+ static UUID = 'E863F10C-079E-48FF-8F27-9C2605A29F52';
4
+ constructor() {
5
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
+ // @ts-ignore: unable to override class constructor parameters as its a type and not a value
7
+ super('Total Consumption', TotalConsumptionCharacteristic.UUID, {
8
+ maxValue: 4294967295,
9
+ minValue: 0,
7
10
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
- // @ts-ignore: unable to override class constructor parameters as its a type and not a value
9
- super('Total Consumption', TotalConsumptionCharacteristic.UUID, {
10
- maxValue: 4294967295,
11
- minValue: 0,
12
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
13
- // @ts-ignore: custom unit
14
- unit: 'kWh',
15
- minStep: 0.001,
16
- });
17
- }
18
- },
19
- _a.UUID = 'E863F10C-079E-48FF-8F27-9C2605A29F52',
20
- _a;
11
+ // @ts-ignore: custom unit
12
+ unit: 'kWh',
13
+ minStep: 0.001,
14
+ });
15
+ }
16
+ };
21
17
  }
22
- exports.default = totalConsumption;
23
18
  //# sourceMappingURL=totalConsumptionCharacteristic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"totalConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/totalConsumptionCharacteristic.ts"],"names":[],"mappings":";;AAEA,SAAwB,gBAAgB,CACtC,qBAA4C;;IAE5C,YAAO,MAAM,8BAA+B,SAAQ,qBAAqB;YAGnE;gBACE,6DAA6D;gBAC7D,4FAA4F;gBAC5F,KAAK,CAAC,mBAAmB,EAAE,8BAA8B,CAAC,IAAI,EAAE;oBAC9D,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE,CAAC;oBACX,6DAA6D;oBAC7D,0BAA0B;oBAC1B,IAAI,EAAE,KAAK;oBACX,OAAO,EAAE,KAAK;iBACf,CAAC,CAAC;YACL,CAAC;SACN;QAdqB,OAAI,GAAG,sCAAuC;WAclE;AACJ,CAAC;AAnBD,mCAmBC"}
1
+ {"version":3,"file":"totalConsumptionCharacteristic.js","sourceRoot":"","sources":["../../src/custom-characteristics/totalConsumptionCharacteristic.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,qBAA4C;IAE5C,OAAO,MAAM,8BAA+B,SAAQ,qBAAqB;QACvE,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,6DAA6D;YAC7D,4FAA4F;YAC5F,KAAK,CAAC,mBAAmB,EAAE,8BAA8B,CAAC,IAAI,EAAE;gBAC9D,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,CAAC;gBACX,6DAA6D;gBAC7D,0BAA0B;gBAC1B,IAAI,EAAE,KAAK;gBACX,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -27,4 +27,3 @@ export type ConsumptionInfo = {
27
27
  total?: number;
28
28
  current: number;
29
29
  };
30
- //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=types.js.map
package/dist/index.d.ts CHANGED
@@ -3,5 +3,4 @@ import { API } from 'homebridge';
3
3
  * This method registers the platform with Homebridge
4
4
  */
5
5
  declare const _default: (api: API) => void;
6
- export = _default;
7
- //# sourceMappingURL=index.d.ts.map
6
+ export default _default;
package/dist/index.js CHANGED
@@ -1,10 +1,9 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const platform_1 = __importDefault(require("./platform"));
6
- const settings_1 = require("./settings");
7
- module.exports = (api) => {
8
- api.registerPlatform(settings_1.PLATFORM_NAME, platform_1.default);
1
+ import { TapoPlatform } from './platform.js';
2
+ import { PLATFORM_NAME } from './settings.js';
3
+ /**
4
+ * This method registers the platform with Homebridge
5
+ */
6
+ export default (api) => {
7
+ api.registerPlatform(PLATFORM_NAME, TapoPlatform);
9
8
  };
10
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,0DAAsC;AACtC,yCAA2C;AAM3C,iBAAS,CAAC,GAAQ,EAAE,EAAE;IACpB,GAAG,CAAC,gBAAgB,CAAC,wBAAa,EAAE,kBAAY,CAAC,CAAC;AACpD,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,eAAe,CAAC,GAAQ,EAAE,EAAE;IAC1B,GAAG,CAAC,gBAAgB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AACpD,CAAC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic, WithUUID } from 'homebridge';
2
- import { TapoConfig } from './config';
2
+ import { TapoConfig } from './config.js';
3
3
  /**
4
4
  * TapoPlatform
5
5
  * This class is the main constructor for your plugin, this is where you should
6
6
  * parse the user config and discover/register accessories with Homebridge.
7
7
  */
8
- export default class TapoPlatform implements DynamicPlatformPlugin {
8
+ export declare class TapoPlatform implements DynamicPlatformPlugin {
9
9
  readonly log: Logger;
10
10
  readonly api: API;
11
11
  readonly Service: typeof Service;
@@ -29,4 +29,3 @@ export default class TapoPlatform implements DynamicPlatformPlugin {
29
29
  */
30
30
  discoverDevices(): void;
31
31
  }
32
- //# sourceMappingURL=platform.d.ts.map
package/dist/platform.js CHANGED
@@ -1,36 +1,40 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const settings_1 = require("./settings");
7
- const platformP100Accessory_1 = require("./platformP100Accessory");
8
- const config_1 = require("./config");
9
- const platformL510EAccessory_1 = require("./platformL510EAccessory");
10
- const platformL530Accessory_1 = require("./platformL530Accessory");
11
- const fakegato_history_1 = __importDefault(require("fakegato-history"));
12
- const platformP110Accessory_1 = require("./platformP110Accessory");
13
- const custom_characteristics_1 = __importDefault(require("./custom-characteristics"));
14
- const platformL520EAccessory_1 = require("./platformL520EAccessory");
1
+ import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js';
2
+ import { P100Accessory } from './platformP100Accessory.js';
3
+ import { parseConfig } from './config.js';
4
+ import { L510EAccessory } from './platformL510EAccessory.js';
5
+ import { L530Accessory } from './platformL530Accessory.js';
6
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
+ //@ts-ignore
8
+ import fakegato from 'fakegato-history';
9
+ import { P110Accessory } from './platformP110Accessory.js';
10
+ import Characteristics from './custom-characteristics/index.js';
11
+ import { L520EAccessory } from './platformL520EAccessory.js';
15
12
  /**
16
13
  * TapoPlatform
17
14
  * This class is the main constructor for your plugin, this is where you should
18
15
  * parse the user config and discover/register accessories with Homebridge.
19
16
  */
20
- class TapoPlatform {
17
+ export class TapoPlatform {
18
+ log;
19
+ api;
20
+ Service;
21
+ Characteristic;
22
+ FakeGatoHistoryService;
23
+ // this is used to track restored cached accessories
24
+ accessories = [];
25
+ config;
26
+ customCharacteristics;
21
27
  constructor(log, config, api) {
22
28
  this.log = log;
23
29
  this.api = api;
24
- this.Service = this.api.hap.Service;
25
- this.Characteristic = this.api.hap.Characteristic;
26
- // this is used to track restored cached accessories
27
- this.accessories = [];
30
+ this.Service = api.hap.Service;
31
+ this.Characteristic = api.hap.Characteristic;
28
32
  this.log.debug('config.json: %j', config);
29
- this.config = (0, config_1.parseConfig)(config);
33
+ this.config = parseConfig(config);
30
34
  this.log.debug('config: %j', this.config);
31
35
  this.log.debug('Finished initializing platform:', this.config.name);
32
- this.customCharacteristics = (0, custom_characteristics_1.default)(api.hap.Characteristic);
33
- this.FakeGatoHistoryService = (0, fakegato_history_1.default)(this.api);
36
+ this.customCharacteristics = Characteristics(api.hap.Characteristic);
37
+ this.FakeGatoHistoryService = fakegato(this.api);
34
38
  // When this event is fired it means Homebridge has restored all cached accessories from disk.
35
39
  // Dynamic Platform plugins should only register new accessories after this event was fired,
36
40
  // in order to ensure they weren't added to homebridge already. This event can also be used
@@ -80,19 +84,19 @@ class TapoPlatform {
80
84
  // create the accessory handler for the restored accessory
81
85
  // this is imported from `platformAccessory.ts`
82
86
  if (device.type && device.type.toLowerCase() === 'colorlight') {
83
- new platformL530Accessory_1.L530Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
87
+ new L530Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
84
88
  }
85
89
  else if (device.type && device.type.toLowerCase() === 'whiteLight') {
86
- new platformL520EAccessory_1.L520EAccessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
90
+ new L520EAccessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
87
91
  }
88
92
  else if (device.type && device.type.toLowerCase() === 'light') {
89
- new platformL510EAccessory_1.L510EAccessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
93
+ new L510EAccessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
90
94
  }
91
95
  else if (device.type && device.type.toLowerCase() === 'powerplug') {
92
- new platformP110Accessory_1.P110Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
96
+ new P110Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
93
97
  }
94
98
  else {
95
- new platformP100Accessory_1.P100Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
99
+ new P100Accessory(this.log, this, existingAccessory, device.timeout ? device.timeout : 2, device.updateInterval);
96
100
  }
97
101
  // update accessory cache with any changes to the accessory details and information
98
102
  this.api.updatePlatformAccessories([existingAccessory]);
@@ -100,7 +104,7 @@ class TapoPlatform {
100
104
  else if (!device) {
101
105
  // it is possible to remove platform accessories at any time using `api.unregisterPlatformAccessories`, eg.:
102
106
  // remove platform accessories when no longer present
103
- this.api.unregisterPlatformAccessories(settings_1.PLUGIN_NAME, settings_1.PLATFORM_NAME, [existingAccessory]);
107
+ this.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [existingAccessory]);
104
108
  this.log.info('Removing existing accessory from cache:', existingAccessory.displayName);
105
109
  }
106
110
  }
@@ -116,7 +120,7 @@ class TapoPlatform {
116
120
  // store a copy of the device object in the `accessory.context`
117
121
  // the `context` property can be used to store any data about the accessory you may need
118
122
  accessory.context.device = device;
119
- new platformL530Accessory_1.L530Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
123
+ new L530Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
120
124
  }
121
125
  else if (device.type && device.type.toLowerCase() === 'light') {
122
126
  // create a new accessory
@@ -124,7 +128,7 @@ class TapoPlatform {
124
128
  // store a copy of the device object in the `accessory.context`
125
129
  // the `context` property can be used to store any data about the accessory you may need
126
130
  accessory.context.device = device;
127
- new platformL510EAccessory_1.L510EAccessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
131
+ new L510EAccessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
128
132
  }
129
133
  else if (device.type && device.type.toLowerCase() === 'whiteLight') {
130
134
  // create a new accessory
@@ -132,7 +136,7 @@ class TapoPlatform {
132
136
  // store a copy of the device object in the `accessory.context`
133
137
  // the `context` property can be used to store any data about the accessory you may need
134
138
  accessory.context.device = device;
135
- new platformL520EAccessory_1.L520EAccessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
139
+ new L520EAccessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
136
140
  }
137
141
  else if (device.type && device.type.toLowerCase() === 'powerplug') {
138
142
  // create a new accessory
@@ -140,7 +144,7 @@ class TapoPlatform {
140
144
  // store a copy of the device object in the `accessory.context`
141
145
  // the `context` property can be used to store any data about the accessory you may need
142
146
  accessory.context.device = device;
143
- new platformP110Accessory_1.P110Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
147
+ new P110Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
144
148
  }
145
149
  else {
146
150
  // create a new accessory
@@ -148,14 +152,13 @@ class TapoPlatform {
148
152
  // store a copy of the device object in the `accessory.context`
149
153
  // the `context` property can be used to store any data about the accessory you may need
150
154
  accessory.context.device = device;
151
- new platformP100Accessory_1.P100Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
155
+ new P100Accessory(this.log, this, accessory, device.timeout ? device.timeout : 2, device.updateInterval);
152
156
  }
153
157
  // link the accessory to your platform
154
- this.api.registerPlatformAccessories(settings_1.PLUGIN_NAME, settings_1.PLATFORM_NAME, [accessory]);
158
+ this.api.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
155
159
  }
156
160
  }
157
161
  }
158
162
  }
159
163
  }
160
- exports.default = TapoPlatform;
161
164
  //# sourceMappingURL=platform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;;;AAYA,yCAAwD;AACxD,mEAAwD;AACxD,qCAAmD;AACnD,qEAA0D;AAC1D,mEAAwD;AACxD,wEAAwC;AACxC,mEAAwD;AACxD,sFAAuD;AACvD,qEAA0D;AAE1D;;;;GAIG;AACH,MAAqB,YAAY;IAc/B,YACkB,GAAW,EAC3B,MAAsB,EACN,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QAEX,QAAG,GAAH,GAAG,CAAK;QAhBV,YAAO,GAAmB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;QAC/C,mBAAc,GAA0B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,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CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,4BAAoB,CAAC;wBAC7G,+DAA+D;wBAC/D,wFAAwF;wBACxF,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;wBAClC,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;oBAC3G,CAAC;yBAAK,CAAC;wBACL,yBAAyB;wBACzB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,4BAAoB,CAAC;wBAC7G,+DAA+D;wBAC/D,wFAAwF;wBACxF,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;wBAClC,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;oBAC3G,CAAC;oBAED,sCAAsC;oBACtC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,WAAW,EAAE,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;gBAChF,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import { PlatformAccessory, CharacteristicValue, CharacteristicSetCallback, CharacteristicGetCallback, Logger } from 'homebridge';
2
- import TapoPlatform from './platform';
3
- import L510E from './utils/l510e';
4
- import { TPLinkPlatformAccessory } from './platformTPLinkAccessory';
2
+ import type { TapoPlatform } from './platform.js';
3
+ import L510E from './utils/l510e.js';
4
+ import { TPLinkPlatformAccessory } from './platformTPLinkAccessory.js';
5
5
  /**
6
6
  * L510E Accessory
7
7
  * An instance of this class is created for each accessory your platform registers
@@ -28,4 +28,3 @@ export declare class L510EAccessory extends TPLinkPlatformAccessory<L510E> {
28
28
  getBrightness(callback: CharacteristicGetCallback): void;
29
29
  protected updateState(interval: number): void;
30
30
  }
31
- //# sourceMappingURL=platformL510EAccessory.d.ts.map
@@ -1,17 +1,16 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.L510EAccessory = void 0;
7
- const l510e_1 = __importDefault(require("./utils/l510e"));
8
- const platformTPLinkAccessory_1 = require("./platformTPLinkAccessory");
1
+ import L510E from './utils/l510e.js';
2
+ import { TPLinkPlatformAccessory } from './platformTPLinkAccessory.js';
9
3
  /**
10
4
  * L510E Accessory
11
5
  * An instance of this class is created for each accessory your platform registers
12
6
  * Each accessory may expose multiple services of different service types.
13
7
  */
14
- class L510EAccessory extends platformTPLinkAccessory_1.TPLinkPlatformAccessory {
8
+ export class L510EAccessory extends TPLinkPlatformAccessory {
9
+ log;
10
+ platform;
11
+ accessory;
12
+ timeout;
13
+ updateInterval;
15
14
  constructor(log, platform, accessory, timeout, updateInterval) {
16
15
  super(log, platform, accessory, timeout, updateInterval);
17
16
  this.log = log;
@@ -19,7 +18,7 @@ class L510EAccessory extends platformTPLinkAccessory_1.TPLinkPlatformAccessory {
19
18
  this.accessory = accessory;
20
19
  this.timeout = timeout;
21
20
  this.updateInterval = updateInterval;
22
- this.tpLinkAccessory = new l510e_1.default(this.log, accessory.context.device.host, platform.config.username, platform.config.password, this.timeout);
21
+ this.tpLinkAccessory = new L510E(this.log, accessory.context.device.host, platform.config.username, platform.config.password, this.timeout);
23
22
  this.initialise(platform, updateInterval);
24
23
  // get the Outlet service if it exists, otherwise create a new Outlet service
25
24
  this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb);
@@ -134,5 +133,4 @@ class L510EAccessory extends platformTPLinkAccessory_1.TPLinkPlatformAccessory {
134
133
  }, interval);
135
134
  }
136
135
  }
137
- exports.L510EAccessory = L510EAccessory;
138
136
  //# sourceMappingURL=platformL510EAccessory.js.map