Skip to content

Commit

Permalink
fix: add isThirdPartyCamera field to Camera model (#302)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
RaHehl and pre-commit-ci[bot] authored Dec 2, 2024
1 parent 5c11747 commit 828b510
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/uiprotect/data/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,8 @@ class Camera(ProtectMotionDeviceModel):
is_ptz: bool | None = None
# requires 2.11.13+
audio_settings: CameraAudioSettings | None = None

# requires 5.0.33+
is_third_party_camera: bool | None = None
# TODO: used for adopting
# apMac read only
# apRssi read only
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ def tmp_binary_file():
"trackNo",
"hasHttpsClientOTA",
"isUCoreStacked",
# 5.0.33+
"isThirdPartyCamera",
}

NEW_CAMERA_FEATURE_FLAGS = {
Expand Down
1 change: 1 addition & 0 deletions tests/sample_data/sample_camera.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"videoReconfigurationInProgress": false,
"voltage": 27.3,
"isPoorNetwork": false,
"isThirdPartyCamera": false,
"wiredConnectionState": {
"phyRate": null
},
Expand Down

0 comments on commit 828b510

Please sign in to comment.