Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
fix config names
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandawg93 committed Jul 29, 2020
1 parent 138e98f commit ed55f74
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
"title": "Alert Type",
"type": "string",
"oneOf": [
{ "title": "Motion", "enum": ["motion"] },
{ "title": "Sound", "enum": ["sound"] },
{ "title": "Person", "enum": ["person"] },
{ "title": "Package Retrieved", "enum": ["package-retrieved"] },
{ "title": "Package Delivered", "enum": ["package-delivered"] },
{ "title": "Face", "enum": ["face"] }
{ "title": "Motion", "enum": ["Motion"] },
{ "title": "Sound", "enum": ["Sound"] },
{ "title": "Person", "enum": ["Person"] },
{ "title": "Package Retrieved", "enum": ["Package Retrieved"] },
{ "title": "Package Delivered", "enum": ["Package Delivered"] },
{ "title": "Face", "enum": ["Face"] }
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Nest Cam",
"name": "homebridge-nest-cam",
"version": "4.0.0-test.5",
"version": "4.0.0",
"description": "Nest cam plugin for homebridge: https://homebridge.io/",
"main": "dist/index.js",
"license": "GPL-3.0",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NestCamPlatform implements DynamicPlatformPlugin {
private chimeSwitch = true;
private audioSwitch = true;
private structures: Array<string> = [];
private alertTypes: Array<string> = ['Motion', 'Sound', 'Person', 'Package Delivered', 'Package Retrieved', 'face'];
private alertTypes: Array<string> = ['Motion', 'Sound', 'Person', 'Package Delivered', 'Package Retrieved', 'Face'];

constructor(log: Logging, config: PlatformConfig, api: API) {
this.log = log;
Expand Down Expand Up @@ -331,8 +331,8 @@ class NestCamPlatform implements DynamicPlatformPlugin {
// Motion configuration
if (camera.info.full_camera_enabled) {
if (camera.info.capabilities.includes('stranger_detection')) {
const useFaces = camera.alertTypes.includes('face');
const index = camera.alertTypes.indexOf('face');
const useFaces = camera.alertTypes.includes('Face');
const index = camera.alertTypes.indexOf('Face');
if (index > -1) {
camera.alertTypes.splice(index, 1);
}
Expand Down

0 comments on commit ed55f74

Please sign in to comment.