Skip to content

Commit

Permalink
Add Spotlight Cam Pro and enable motion detection for Stickup Cam
Browse files Browse the repository at this point in the history
  • Loading branch information
sdb9696 committed Dec 12, 2023
1 parent 12b4596 commit 078f9e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ring_doorbell/cli.py
Expand Up @@ -259,7 +259,7 @@ async def motion_detection(ctx, ring: Ring, device_name, turn_on, turn_off):
)
return await ctx.invoke(list_command)
if not device.has_capability("motion_detection"):
echo(f"{str(device_name)} is not capable of motion detection")
echo(f"{str(device)} is not capable of motion detection")
return

state = "on" if device.motion_detection else "off"
Expand Down
1 change: 1 addition & 0 deletions ring_doorbell/const.py
Expand Up @@ -102,6 +102,7 @@ class OAuth:
SPOTLIGHT_CAM_BATTERY_KINDS = ["stickup_cam_v4"]
SPOTLIGHT_CAM_WIRED_KINDS = ["hp_cam_v2", "spotlightw_v2"]
SPOTLIGHT_CAM_PLUS_KINDS = ["cocoa_spotlight"]
SPOTLIGHT_CAM_PRO_KINDS = ["stickup_cam_longfin"]
STICKUP_CAM_KINDS = ["stickup_cam", "stickup_cam_v3"]
STICKUP_CAM_BATTERY_KINDS = ["stickup_cam_lunar"]
STICKUP_CAM_ELITE_KINDS = ["stickup_cam_elite", "stickup_cam_wired"]
Expand Down
7 changes: 7 additions & 0 deletions ring_doorbell/stickup_cam.py
Expand Up @@ -18,6 +18,7 @@
SIREN_ENDPOINT,
SPOTLIGHT_CAM_BATTERY_KINDS,
SPOTLIGHT_CAM_PLUS_KINDS,
SPOTLIGHT_CAM_PRO_KINDS,
SPOTLIGHT_CAM_WIRED_KINDS,
STICKUP_CAM_BATTERY_KINDS,
STICKUP_CAM_ELITE_KINDS,
Expand Down Expand Up @@ -68,6 +69,8 @@ def model(self):
)
if self.kind in SPOTLIGHT_CAM_PLUS_KINDS:
return "Spotlight Cam Plus"
if self.kind in SPOTLIGHT_CAM_PRO_KINDS:
return "Spotlight Cam Pro"
if self.kind in STICKUP_CAM_KINDS:
return "Stick Up Cam"
if self.kind in STICKUP_CAM_BATTERY_KINDS:
Expand Down Expand Up @@ -96,6 +99,7 @@ def has_capability(self, capability):
+ SPOTLIGHT_CAM_BATTERY_KINDS
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
)
if capability == "siren":
return self.kind in (
Expand All @@ -107,6 +111,7 @@ def has_capability(self, capability):
+ SPOTLIGHT_CAM_BATTERY_KINDS
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
+ STICKUP_CAM_BATTERY_KINDS
+ STICKUP_CAM_ELITE_KINDS
+ STICKUP_CAM_GEN3_KINDS
Expand All @@ -121,6 +126,8 @@ def has_capability(self, capability):
+ SPOTLIGHT_CAM_BATTERY_KINDS
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
+ STICKUP_CAM_KINDS
+ STICKUP_CAM_BATTERY_KINDS
+ STICKUP_CAM_ELITE_KINDS
+ STICKUP_CAM_GEN3_KINDS
Expand Down

0 comments on commit 078f9e8

Please sign in to comment.