Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion abodepy/devices/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def image_to_file(self, path, get_image=True):
def privacy_mode(self, enable):
"""Set camera privacy mode (camera on/off)."""
if self._json_state['privacy']:
privacy = '0' if enable else '1'
privacy = '1' if enable else '0'

url = CONST.PARAMS_URL + self.device_id

Expand Down
4 changes: 2 additions & 2 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ def tests_camera_privacy_mode(self, m):

# Set up params URL response for privacy mode on
m.put(CONST.PARAMS_URL + device.device_id,
text=IPCAM.device(privacy=0))
text=IPCAM.device(privacy=1))

# Set privacy mode on
self.assertTrue(device.privacy_mode(True))

# Set up params URL response for privacy mode off
m.put(CONST.PARAMS_URL + device.device_id,
text=IPCAM.device(privacy=1))
text=IPCAM.device(privacy=0))

# Set privacy mode off
self.assertTrue(device.privacy_mode(False))
Expand Down