Skip to content

Commit

Permalink
Merge pull request #57 from apatsufas/1.5.2
Browse files Browse the repository at this point in the history
1.5.2
  • Loading branch information
apatsufas authored Oct 17, 2024
2 parents 984b0c7 + 05d2c9c commit aaddca7
Show file tree
Hide file tree
Showing 23 changed files with 319 additions and 153 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ tsconfig.json
# vscode
.vscode

.DS_Store

# nodemon
nodemon.json

Expand Down
145 changes: 120 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"displayName": "Tapo P100 Plugin",
"name": "homebridge-tapo",
"type": "module",
"private": true,
"version": "1.5.1",
"version": "1.5.2",
"description": "Homebridge Plugin for TP-Link Tapo P100 Plugs",
"license": "Apache-2.0",
"homepage": "https://github.com/apatsufas/homebridge-tapo-p100#readme",
Expand Down Expand Up @@ -37,18 +36,18 @@
"tp-link"
],
"dependencies": {
"axios": "^0.21.1",
"fakegato-history": "^0.6.2",
"axios": "^1.7.7",
"fakegato-history": "^0.6.5",
"lodash.defaults": "^4.2.0",
"node-cron": "^3.0.3",
"utf8": "^3.0.0",
"uuid": "8.3.2"
"uuid": "10.0.0"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/eslint__js": "^8.42.3",
"@types/lodash.defaults": "^4.2.9",
"@types/node": "^22.2.0",
"@types/utf8": "^3.0.3",
"@types/uuid": "^10.0.0",
"eslint": "^9.9.0",
"homebridge": "^2.0.0-beta.0",
Expand Down
Binary file modified src/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions src/custom-characteristics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type {
WithUUID,
} from 'homebridge';

import DefaultCharacteristicImport from './default-characteristic';
import CurrentConsumptionCharacteristicImport from './currentConsumptionCharacteristic';
import TotalConsumptionCharacteristicImport from './totalConsumptionCharacteristic';
import DefaultCharacteristicImport from './default-characteristic.js';
import CurrentConsumptionCharacteristicImport from './currentConsumptionCharacteristic.js';
import TotalConsumptionCharacteristicImport from './totalConsumptionCharacteristic.js';

export default function characteristic(
Characteristic: typeof CharacteristicClass,
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { API } from 'homebridge';
import TapoPlatform from './platform';
import { PLATFORM_NAME } from './settings';

import { TapoPlatform } from './platform.js';
import { PLATFORM_NAME } from './settings.js';

/**
* This method registers the platform with Homebridge
Expand Down
20 changes: 10 additions & 10 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ import {
Categories,
} from 'homebridge';

import { PLATFORM_NAME, PLUGIN_NAME } from './settings';
import { P100Accessory } from './platformP100Accessory';
import { parseConfig, TapoConfig } from './config';
import { L510EAccessory } from './platformL510EAccessory';
import { L530Accessory } from './platformL530Accessory';
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js';
import { P100Accessory } from './platformP100Accessory.js';
import { parseConfig, TapoConfig } from './config.js';
import { L510EAccessory } from './platformL510EAccessory.js';
import { L530Accessory } from './platformL530Accessory.js';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
import fakegato from 'fakegato-history';
import { P110Accessory } from './platformP110Accessory';
import Characteristics from './custom-characteristics';
import { L520EAccessory } from './platformL520EAccessory';
import { P110Accessory } from './platformP110Accessory.js';
import Characteristics from './custom-characteristics/index.js';
import { L520EAccessory } from './platformL520EAccessory.js';

/**
* TapoPlatform
* This class is the main constructor for your plugin, this is where you should
* parse the user config and discover/register accessories with Homebridge.
*/
export default class TapoPlatform implements DynamicPlatformPlugin {
export class TapoPlatform implements DynamicPlatformPlugin {
public readonly Service: typeof Service;
public readonly Characteristic: typeof Characteristic;
public readonly FakeGatoHistoryService;
Expand All @@ -48,7 +48,7 @@ export default class TapoPlatform implements DynamicPlatformPlugin {
) {
this.Service = api.hap.Service;
this.Characteristic = api.hap.Characteristic;

this.log.debug('config.json: %j', config);
this.config = parseConfig(config);
this.log.debug('config: %j', this.config);
Expand Down
6 changes: 3 additions & 3 deletions src/platformL510EAccessory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PlatformAccessory, CharacteristicValue, CharacteristicSetCallback, CharacteristicGetCallback, Logger } from 'homebridge';
import TapoPlatform from './platform';
import L510E from './utils/l510e';
import { TPLinkPlatformAccessory } from './platformTPLinkAccessory';
import type { TapoPlatform } from './platform.js';
import L510E from './utils/l510e.js';
import { TPLinkPlatformAccessory } from './platformTPLinkAccessory.js';

/**
* L510E Accessory
Expand Down
6 changes: 3 additions & 3 deletions src/platformL520EAccessory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PlatformAccessory, CharacteristicValue, CharacteristicSetCallback, CharacteristicGetCallback, Logger } from 'homebridge';
import TapoPlatform from './platform';
import L520E from './utils/l520e';
import { TPLinkPlatformAccessory } from './platformTPLinkAccessory';
import type { TapoPlatform } from './platform.js';
import L520E from './utils/l520e.js';
import { TPLinkPlatformAccessory } from './platformTPLinkAccessory.js';

/**
* L510E Accessory
Expand Down
Loading

0 comments on commit aaddca7

Please sign in to comment.