Skip to content

Commit

Permalink
Adding logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiro committed Aug 2, 2024
1 parent 7dabfa9 commit 6b780e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cameraAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export class CameraAccessory {
toggleService
.getCharacteristic(this.api.hap.Characteristic.On)
.onGet(async () => {
this.log.debug(`Getting "${tapoServiceStr}" status...`);

const cameraStatus = await this.camera.getStatus();
const value = cameraStatus[tapoServiceStr];
if (value !== undefined) {
Expand All @@ -122,7 +124,7 @@ export class CameraAccessory {
})
.onSet(async (newValue) => {
this.log.info(
`Setting ${tapoServiceStr} to ${newValue ? "on" : "off"}`
`Setting "${tapoServiceStr}" to ${newValue ? "on" : "off"}...`
);
this.camera.setStatus(tapoServiceStr, Boolean(newValue));
});
Expand Down

0 comments on commit 6b780e1

Please sign in to comment.