Updated node-botvac

This commit is contained in:
Arne Blumentritt 2021-05-04 14:01:32 +02:00
parent f7f70ac478
commit 7173b2ec9e
3 changed files with 61 additions and 61 deletions

94
package-lock.json generated
View File

@ -14,18 +14,18 @@
} }
}, },
"@babel/helper-validator-identifier": { "@babel/helper-validator-identifier": {
"version": "7.12.11", "version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz",
"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==",
"dev": true "dev": true
}, },
"@babel/highlight": { "@babel/highlight": {
"version": "7.13.10", "version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz",
"integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.12.11", "@babel/helper-validator-identifier": "^7.14.0",
"chalk": "^2.0.0", "chalk": "^2.0.0",
"js-tokens": "^4.0.0" "js-tokens": "^4.0.0"
}, },
@ -151,13 +151,13 @@
"dev": true "dev": true
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.1.tgz",
"integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", "integrity": "sha512-kVTAghWDDhsvQ602tHBc6WmQkdaYbkcTwZu+7l24jtJiYvm9l+/y/b2BZANEezxPDiX5MK2ZecE+9BFi/YJryw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "4.22.0", "@typescript-eslint/experimental-utils": "4.22.1",
"@typescript-eslint/scope-manager": "4.22.0", "@typescript-eslint/scope-manager": "4.22.1",
"debug": "^4.1.1", "debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15", "lodash": "^4.17.15",
@ -167,55 +167,55 @@
} }
}, },
"@typescript-eslint/experimental-utils": { "@typescript-eslint/experimental-utils": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.1.tgz",
"integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", "integrity": "sha512-svYlHecSMCQGDO2qN1v477ax/IDQwWhc7PRBiwAdAMJE7GXk5stF4Z9R/8wbRkuX/5e9dHqbIWxjeOjckK3wLQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.3", "@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.22.0", "@typescript-eslint/scope-manager": "4.22.1",
"@typescript-eslint/types": "4.22.0", "@typescript-eslint/types": "4.22.1",
"@typescript-eslint/typescript-estree": "4.22.0", "@typescript-eslint/typescript-estree": "4.22.1",
"eslint-scope": "^5.0.0", "eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0" "eslint-utils": "^2.0.0"
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.1.tgz",
"integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", "integrity": "sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "4.22.0", "@typescript-eslint/scope-manager": "4.22.1",
"@typescript-eslint/types": "4.22.0", "@typescript-eslint/types": "4.22.1",
"@typescript-eslint/typescript-estree": "4.22.0", "@typescript-eslint/typescript-estree": "4.22.1",
"debug": "^4.1.1" "debug": "^4.1.1"
} }
}, },
"@typescript-eslint/scope-manager": { "@typescript-eslint/scope-manager": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz",
"integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", "integrity": "sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.22.0", "@typescript-eslint/types": "4.22.1",
"@typescript-eslint/visitor-keys": "4.22.0" "@typescript-eslint/visitor-keys": "4.22.1"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.1.tgz",
"integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", "integrity": "sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz",
"integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", "integrity": "sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.22.0", "@typescript-eslint/types": "4.22.1",
"@typescript-eslint/visitor-keys": "4.22.0", "@typescript-eslint/visitor-keys": "4.22.1",
"debug": "^4.1.1", "debug": "^4.1.1",
"globby": "^11.0.1", "globby": "^11.0.1",
"is-glob": "^4.0.1", "is-glob": "^4.0.1",
@ -224,12 +224,12 @@
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "4.22.0", "version": "4.22.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz",
"integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", "integrity": "sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.22.0", "@typescript-eslint/types": "4.22.1",
"eslint-visitor-keys": "^2.0.0" "eslint-visitor-keys": "^2.0.0"
} }
}, },
@ -1017,9 +1017,9 @@
} }
}, },
"eslint-visitor-keys": { "eslint-visitor-keys": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
"dev": true "dev": true
}, },
"espree": { "espree": {
@ -1893,9 +1893,9 @@
"dev": true "dev": true
}, },
"node-botvac": { "node-botvac": {
"version": "0.4.1", "version": "0.4.2",
"resolved": "https://registry.npmjs.org/node-botvac/-/node-botvac-0.4.1.tgz", "resolved": "https://registry.npmjs.org/node-botvac/-/node-botvac-0.4.2.tgz",
"integrity": "sha512-iJY5nDGBPoQ4exS4spoPGC4z1sIC52krSUEX5qBqaS27bIjqfFvPMJwBoiizoUR8dYdvE40gONOe0uPYOPhVUg==", "integrity": "sha512-x7DKQ7NpxNjx7+iVCDhBebY2KMaQgm7furJv094XGYLRdilJE2vsyKTdL1mJxXrFJAYDAZN9w3KkrI4OQaKByw==",
"requires": { "requires": {
"axios": "^0.21.1" "axios": "^0.21.1"
} }

View File

@ -48,7 +48,7 @@
"dependencies": { "dependencies": {
"colors": "^1.4.0", "colors": "^1.4.0",
"debug": "^4.1.1", "debug": "^4.1.1",
"node-botvac": "^0.4.1", "node-botvac": "^0.4.2",
"uuid": "^3.3.2" "uuid": "^3.3.2"
}, },
"devDependencies": { "devDependencies": {

View File

@ -12,16 +12,16 @@ export class NeatoVacuumRobotAccessory
// Homebridge // Homebridge
private log: Logger; private log: Logger;
private batteryService: Service; private batteryService: Service;
private cleanService: Service | null; private readonly cleanService: Service | null;
private findMeService: Service | null; private readonly findMeService: Service | null;
private goToDockService: Service | null; private readonly goToDockService: Service | null;
private dockStateService: Service | null; private readonly dockStateService: Service | null;
private binFullService: Service | null; private readonly binFullService: Service | null;
private ecoService: Service | null; private readonly ecoService: Service | null;
private noGoLinesService: Service | null; private readonly noGoLinesService: Service | null;
private extraCareService: Service | null; private readonly extraCareService: Service | null;
private scheduleService: Service | null; private readonly scheduleService: Service | null;
private spotCleanService: Service | null; private readonly spotCleanService: Service | null;
// Context // Context
private robot: any; private robot: any;
@ -171,14 +171,14 @@ export class NeatoVacuumRobotAccessory
private getSwitchService(serviceName: string) private getSwitchService(serviceName: string)
{ {
let displayName = this.prefix ? this.robot.name + serviceName : serviceName; let displayName = this.prefix ? this.robot.name + serviceName : serviceName;
if (this.availableServices.includes(serviceName)) if (this.availableServices.includes(serviceName))
{ {
return this.accessory.getService(displayName) || this.accessory.addService(this.platform.Service.Switch, displayName, serviceName); return this.accessory.getService(displayName) || this.accessory.addService(this.platform.Service.Switch, displayName, serviceName);
} }
else else
{ {
if(this.accessory.getService(displayName)) if (this.accessory.getService(displayName))
{ {
this.accessory.removeService(<Service>this.accessory.getService(displayName)); this.accessory.removeService(<Service>this.accessory.getService(displayName));
} }
@ -196,7 +196,7 @@ export class NeatoVacuumRobotAccessory
} }
else else
{ {
if(this.accessory.getService(displayName)) if (this.accessory.getService(displayName))
{ {
this.accessory.removeService(<Service>this.accessory.getService(displayName)); this.accessory.removeService(<Service>this.accessory.getService(displayName));
} }