Skip to content

Commit

Permalink
fix/core-200-auto (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolae-Rares Ailincai authored May 31, 2023
1 parent 2d90816 commit e77a44c
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
node version-check.js
[ -f .prerelease ] && cat .prerelease >> $GITHUB_ENV
- name: Publish
run: npm publish ${{ env.NPM_EX }}
run: npm publish --provenance --access public ${{ env.NPM_EX }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Levoit Air Purifier",
"main": "dist/index.js",
"license": "Apache-2.0",
"version": "1.3.0",
"version": "1.3.1",
"private": false,
"bugs": {
"url": "https://github.com/RaresAil/homebridge-levoit-air-purifier/issues"
Expand All @@ -28,13 +28,13 @@
"devDependencies": {
"@types/async-lock": "^1.4.0",
"@types/big.js": "^6.1.6",
"@types/node": "^18.16.1",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"eslint": "^8.39.0",
"homebridge": "^1.6.0",
"@types/node": "^20.2.5",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"eslint": "^8.41.0",
"homebridge": "^1.6.1",
"nodemon": "^2.0.22",
"rimraf": "^5.0.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
Expand All @@ -44,12 +44,9 @@
},
"dependencies": {
"async-lock": "^1.4.0",
"axios": "^1.3.6",
"axios": "^1.4.0",
"big.js": "^6.2.1"
},
"resolutions": {
"xml2js": "^0.5.0"
},
"keywords": [
"homebridge-plugin",
"air-purifier",
Expand Down
10 changes: 6 additions & 4 deletions src/VeSyncAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ export default class VeSyncAccessory {
.getCharacteristic(this.platform.Characteristic.CurrentAirPurifierState)
.onGet(CurrentState.get.bind(this));

this.airPurifierService
.getCharacteristic(this.platform.Characteristic.TargetAirPurifierState)
.onGet(TargetState.get.bind(this))
.onSet(TargetState.set.bind(this));
if (this.device.deviceType.hasAutoMode) {
this.airPurifierService
.getCharacteristic(this.platform.Characteristic.TargetAirPurifierState)
.onGet(TargetState.get.bind(this))
.onSet(TargetState.set.bind(this));
}

this.airPurifierService
.getCharacteristic(this.platform.Characteristic.LockPhysicalControls)
Expand Down
10 changes: 5 additions & 5 deletions src/api/VeSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class VeSync {
private accountId?: string;
private token?: string;

private readonly VERSION = '1.2.0';
private readonly VERSION = '1.3.1';
private readonly AGENT = `VeSync/VeSync 3.0.51(F5321;HomeBridge-VeSync ${this.VERSION})`;
private readonly TIMEZONE = 'America/New_York';
private readonly OS = 'HomeBridge-VeSync';
Expand All @@ -42,7 +42,7 @@ export default class VeSync {
private readonly password: string,
public readonly debugMode: DebugMode,
public readonly log: Logger
) {}
) { }

private generateDetailBody() {
return {
Expand All @@ -59,9 +59,9 @@ export default class VeSync {
timeZone: this.TIMEZONE,
...(includeAuth
? {
accountID: this.accountId,
token: this.token
}
accountID: this.accountId,
token: this.token
}
: {})
};
}
Expand Down
Loading

0 comments on commit e77a44c

Please sign in to comment.