Skip to content

Commit e627464

Browse files
committed
Fix for string passed based on boolean
1 parent eb9fbbb commit e627464

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

abodepy/devices/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def image_to_file(self, path, get_image=True):
118118
def privacy_mode(self, enable):
119119
"""Set camera privacy mode (camera on/off)."""
120120
if self._json_state['privacy']:
121-
privacy = '0' if enable else '1'
121+
privacy = '1' if enable else '0'
122122

123123
url = CONST.PARAMS_URL + self.device_id
124124

tests/test_camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,14 @@ def tests_camera_privacy_mode(self, m):
361361

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

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

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

373373
# Set privacy mode off
374374
self.assertTrue(device.privacy_mode(False))

0 commit comments

Comments
 (0)