Add Alarm getters

This commit is contained in:
Karl Moos
2020-10-28 06:07:02 -05:00
parent c8eb387cd1
commit b4f95d7a0b
6 changed files with 168 additions and 4 deletions

11
api/alarm.py Normal file
View File

@@ -0,0 +1,11 @@
class AlarmAPIMixin:
"""API calls for getting device alarm information."""
def get_alarm_motion(self) -> object:
"""
Gets the device alarm motion
See examples/response/GetAlarmMotion.json for example response data.
:return: response json
"""
body = [{"cmd": "GetAlarm", "action": 1, "param": {"Alarm": {"channel": 0, "type": "md"}}}]
return self._execute_command('GetAlarm', body)