From 078f9e889fba627f9c658e5b244d128a0b9b97ed Mon Sep 17 00:00:00 2001 From: sdb9696 Date: Tue, 12 Dec 2023 16:39:28 +0000 Subject: [PATCH] Add Spotlight Cam Pro and enable motion detection for Stickup Cam --- ring_doorbell/cli.py | 2 +- ring_doorbell/const.py | 1 + ring_doorbell/stickup_cam.py | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ring_doorbell/cli.py b/ring_doorbell/cli.py index 8406046..7a09686 100755 --- a/ring_doorbell/cli.py +++ b/ring_doorbell/cli.py @@ -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" diff --git a/ring_doorbell/const.py b/ring_doorbell/const.py index a2bc6a2..6968f77 100644 --- a/ring_doorbell/const.py +++ b/ring_doorbell/const.py @@ -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"] diff --git a/ring_doorbell/stickup_cam.py b/ring_doorbell/stickup_cam.py index 85c236a..b4f86f5 100644 --- a/ring_doorbell/stickup_cam.py +++ b/ring_doorbell/stickup_cam.py @@ -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, @@ -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: @@ -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 ( @@ -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 @@ -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