Skip to content

Commit

Permalink
Fix motion detection status check
Browse files Browse the repository at this point in the history
  • Loading branch information
zagrim authored and MichaIng committed May 28, 2024
1 parent 91a491b commit 71f9fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion motioneye/motionctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ async def get_motion_detection(camera_id) -> utils.GetMotionDetectionResult:
return utils.GetMotionDetectionResult(None, error=utils.pretty_http_error(resp))

resp_body = resp.body.decode('utf-8')
enabled = bool(resp_body.count('active'))
enabled = bool(resp_body.lower().count('active'))

logging.debug(
f"motion detection is {['disabled', 'enabled'][enabled]} for camera with id {id}"
Expand Down

0 comments on commit 71f9fdc

Please sign in to comment.