Skip to content

Commit

Permalink
Add Restart function to camera (#33)
Browse files Browse the repository at this point in the history
Added procedure in cameras.py file to use "Restart" function built into Wyze app. Tested and working on Wyze Cam V2 but cannot speak for other models.
  • Loading branch information
jb773 authored Aug 11, 2021
1 parent 190a5fe commit ed10c0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wyze_sdk/api/devices/cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@ def turn_off(self, *, device_mac: str, device_model: str, **kwargs) -> WyzeRespo
"""
return super()._api_client().run_action(
mac=device_mac, provider_key=device_model, action_key="power_off")

def restart(self, *, device_mac: str, device_model: str, **kwargs) -> WyzeResponse:
"""Restarts a camera.
Args:
:param str device_mac: The device mac. e.g. 'ABCDEF1234567890'
:param str device_model: The device model. e.g. 'WYZEC1-JZ'
"""
return super()._api_client().run_action(
mac=device_mac, provider_key=device_model, action_key="restart")

0 comments on commit ed10c0e

Please sign in to comment.