Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #61 from cpainchaud/main
Browse files Browse the repository at this point in the history
bugfix: GetMdState and GetAiState answers wrong parsing
  • Loading branch information
cpainchaud authored Oct 28, 2021
2 parents 1525431 + cfdedf9 commit cf0cae4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions reolink/camera_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,10 @@ def map_json_response(self, json_data): # pylint: disable=too-many-branches
continue

if data["cmd"] == "GetMdState":
self._motion_state = json_data[0]["value"]["state"] == 1
self._motion_state = data["value"]["state"] == 1

elif data["cmd"] == "GetAiState":
self._ai_state = json_data[0]["value"]
self._ai_state = data["value"]

elif data["cmd"] == "GetDevInfo":
self._device_info = data
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='reolink',
packages=['reolink'],
version='0.0.37',
version='0.0.38',
license='MIT',
description='Reolink camera package',
author='fwestenberg',
Expand Down

0 comments on commit cf0cae4

Please sign in to comment.