Skip to content

Commit 82d1758

Browse files
committed
Reduce verbosity of motion
1 parent dc078f7 commit 82d1758

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/cameraAccessory.ts

+21-19
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,14 @@ export class CameraAccessory {
9797
})
9898
.onSet((status) => {
9999
this.log.debug(`Setting alarm to ${status ? "on" : "off"}`);
100-
this.camera.setAlertConfig(Boolean(status))
101-
.catch(err => {
102-
this.log.error(
103-
`[${this.config.name}]`,
104-
"Error at 'setAlertConfig'.",
105-
err
106-
);
107-
this.cameraStatus = undefined; // Home.app shows 'No Response'
108-
});
100+
this.camera.setAlertConfig(Boolean(status)).catch((err) => {
101+
this.log.error(
102+
`[${this.config.name}]`,
103+
"Error at 'setAlertConfig'.",
104+
err
105+
);
106+
this.cameraStatus = undefined; // Home.app shows 'No Response'
107+
});
109108
});
110109
}
111110

@@ -128,15 +127,14 @@ export class CameraAccessory {
128127
})
129128
.onSet((status) => {
130129
this.log.debug(`Setting privacy to ${status ? "on" : "off"}`);
131-
this.camera.setLensMaskConfig(!status)
132-
.catch(err => {
133-
this.log.error(
134-
`[${this.config.name}]`,
135-
"Error at 'setLensMaskConfig'.",
136-
err
137-
);
138-
this.cameraStatus = undefined; // Home.app shows 'No Response'
139-
});
130+
this.camera.setLensMaskConfig(!status).catch((err) => {
131+
this.log.error(
132+
`[${this.config.name}]`,
133+
"Error at 'setLensMaskConfig'.",
134+
err
135+
);
136+
this.cameraStatus = undefined; // Home.app shows 'No Response'
137+
});
140138
});
141139
}
142140

@@ -188,7 +186,11 @@ export class CameraAccessory {
188186

189187
const eventEmitter = await this.camera.getEventEmitter();
190188
eventEmitter.addListener("motion", (motionDetected) => {
191-
this.log.info(`[${this.config.name}]`, "Motion detected", motionDetected);
189+
this.log.debug(
190+
`[${this.config.name}]`,
191+
"Motion detected",
192+
motionDetected
193+
);
192194

193195
this.motionService?.updateCharacteristic(
194196
this.api.hap.Characteristic.MotionDetected,

0 commit comments

Comments
 (0)