Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ring_doorbell/chime.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from typing import Any, ClassVar

from ring_doorbell.const import (
CHIME_2ND_GEN_KINDS,
CHIME_KINDS,
CHIME_PRO_KINDS,
CHIME_TEST_SOUND_KINDS,
Expand Down Expand Up @@ -48,6 +49,8 @@ def model(self) -> str:
return "Chime"
if self.kind in CHIME_PRO_KINDS:
return "Chime Pro"
if self.kind in CHIME_2ND_GEN_KINDS:
return "Chime (2nd Gen)"
return "Unknown Chime"

def has_capability(self, capability: RingCapability | str) -> bool:
Expand Down
6 changes: 6 additions & 0 deletions ring_doorbell/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def from_name(name: str) -> RingCapability:
# device model kinds
CHIME_KINDS = ["chime", "chime_v2"]
CHIME_PRO_KINDS = ["chime_pro", "chime_pro_v2"]
CHIME_2ND_GEN_KINDS = ["chime_v4"]

DOORBELL_KINDS = ["doorbot", "doorbell", "doorbell_v3"]
DOORBELL_2_KINDS = ["doorbell_v4", "doorbell_v5"]
Expand All @@ -164,6 +165,8 @@ def from_name(name: str) -> RingCapability:
DOORBELL_3_PLUS_KINDS = ["doorbell_scallop"]
DOORBELL_PRO_KINDS = ["lpd_v1", "lpd_v2", "lpd_v3"]
DOORBELL_PRO_2_KINDS = ["lpd_v4"]
DOORBELL_PRO_4K_WIRED_KINDS = ["cocoa_doorbell_v5"]
DOORBELL_PRO_4K_BATTERY_KINDS = ["cocoa_doorbell_v6"]
DOORBELL_ELITE_KINDS = ["jbox_v1"]
DOORBELL_WIRED_KINDS = ["doorbell_graham_cracker"]
DOORBELL_BATTERY_KINDS = ["df_doorbell_clownfish"]
Expand All @@ -180,11 +183,14 @@ def from_name(name: str) -> RingCapability:
SPOTLIGHT_CAM_WIRED_KINDS = ["hp_cam_v2", "spotlightw_v2"]
SPOTLIGHT_CAM_PLUS_KINDS = ["cocoa_spotlight"]
SPOTLIGHT_CAM_PRO_KINDS = ["stickup_cam_longfin"]
SPOTLIGHT_CAM_4K_PRO_KINDS = ["cocoa_spotlight_v2"]
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"]
STICKUP_CAM_WIRED_KINDS = STICKUP_CAM_ELITE_KINDS # Deprecated
STICKUP_CAM_GEN3_KINDS = ["cocoa_camera"]
ELITE_CAM_140_KINDS = ["hexa_camera_2_v1"]
ELITE_CAM_360_KINDS = ["hexa_camera_6_v1"]
BEAM_KINDS = ["beams_ct200_transformer"]

INTERCOM_KINDS = ["intercom_handset_audio", "intercom_handset_video"]
Expand Down
9 changes: 9 additions & 0 deletions ring_doorbell/doorbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
DOORBELL_GEN2_KINDS,
DOORBELL_KINDS,
DOORBELL_PRO_2_KINDS,
DOORBELL_PRO_4K_BATTERY_KINDS,
DOORBELL_PRO_4K_WIRED_KINDS,
DOORBELL_PRO_KINDS,
DOORBELL_VOL_MAX,
DOORBELL_VOL_MIN,
Expand Down Expand Up @@ -96,6 +98,10 @@ def model(self) -> str: # noqa: C901, PLR0911
return "Doorbell Pro"
if self.kind in DOORBELL_PRO_2_KINDS:
return "Doorbell Pro 2"
if self.kind in DOORBELL_PRO_4K_WIRED_KINDS:
return "Wired Doorbell 4K Pro"
if self.kind in DOORBELL_PRO_4K_BATTERY_KINDS:
return "Battery Doorbell 4K Pro"
if self.kind in DOORBELL_ELITE_KINDS:
return "Doorbell Elite"
if self.kind in DOORBELL_WIRED_KINDS:
Expand Down Expand Up @@ -124,6 +130,7 @@ def has_capability(self, capability: RingCapability | str) -> bool: # noqa: PLR
+ DOORBELL_4_KINDS
+ DOORBELL_GEN2_KINDS
+ DOORBELL_BATTERY_KINDS
+ DOORBELL_PRO_4K_BATTERY_KINDS
+ PEEPHOLE_CAM_KINDS
)
if capability == RingCapability.KNOCK:
Expand Down Expand Up @@ -151,6 +158,8 @@ def has_capability(self, capability: RingCapability | str) -> bool: # noqa: PLR
+ DOORBELL_BATTERY_KINDS
+ DOORBELL_GEN2_KINDS
+ DOORBELL_ELITE_KINDS
+ DOORBELL_PRO_4K_WIRED_KINDS
+ DOORBELL_PRO_4K_BATTERY_KINDS
+ PEEPHOLE_CAM_KINDS
)
return False
Expand Down
16 changes: 16 additions & 0 deletions ring_doorbell/stickup_cam.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
SIREN_DURATION_MAX,
SIREN_DURATION_MIN,
SIREN_ENDPOINT,
ELITE_CAM_140_KINDS,
ELITE_CAM_360_KINDS,
SPOTLIGHT_CAM_BATTERY_KINDS,
SPOTLIGHT_CAM_PLUS_KINDS,
SPOTLIGHT_CAM_PRO_KINDS,
SPOTLIGHT_CAM_4K_PRO_KINDS,
SPOTLIGHT_CAM_WIRED_KINDS,
STICKUP_CAM_BATTERY_KINDS,
STICKUP_CAM_ELITE_KINDS,
Expand Down Expand Up @@ -70,6 +73,8 @@ def model(self) -> str: # noqa: C901, PLR0911, PLR0912
return "Spotlight Cam Plus"
if self.kind in SPOTLIGHT_CAM_PRO_KINDS:
return "Spotlight Cam Pro"
if self.kind in SPOTLIGHT_CAM_4K_PRO_KINDS:
return "Spotlight Cam 4K Pro"
if self.kind in STICKUP_CAM_KINDS:
return "Stick Up Cam"
if self.kind in STICKUP_CAM_BATTERY_KINDS:
Expand All @@ -78,6 +83,10 @@ def model(self) -> str: # noqa: C901, PLR0911, PLR0912
return "Stick Up Cam Wired"
if self.kind in STICKUP_CAM_GEN3_KINDS:
return "Stick Up Cam (3rd Gen)"
if self.kind in ELITE_CAM_140_KINDS:
return "Elite 140 4K"
if self.kind in ELITE_CAM_360_KINDS:
return "Elite 360 4K"
_LOGGER.error("Unknown kind: %s", self.kind)
return "Unknown Stickup Cam"

Expand Down Expand Up @@ -106,6 +115,7 @@ def has_capability(self, capability: RingCapability | str) -> bool:
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
+ SPOTLIGHT_CAM_4K_PRO_KINDS
)
if capability == RingCapability.SIREN:
return self.kind in (
Expand All @@ -119,9 +129,12 @@ def has_capability(self, capability: RingCapability | str) -> bool:
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
+ SPOTLIGHT_CAM_4K_PRO_KINDS
+ STICKUP_CAM_BATTERY_KINDS
+ STICKUP_CAM_ELITE_KINDS
+ STICKUP_CAM_GEN3_KINDS
+ ELITE_CAM_140_KINDS
+ ELITE_CAM_360_KINDS
)
if capability in [RingCapability.MOTION_DETECTION, RingCapability.VIDEO]:
return self.kind in (
Expand All @@ -135,10 +148,13 @@ def has_capability(self, capability: RingCapability | str) -> bool:
+ SPOTLIGHT_CAM_WIRED_KINDS
+ SPOTLIGHT_CAM_PLUS_KINDS
+ SPOTLIGHT_CAM_PRO_KINDS
+ SPOTLIGHT_CAM_4K_PRO_KINDS
+ STICKUP_CAM_KINDS
+ STICKUP_CAM_BATTERY_KINDS
+ STICKUP_CAM_ELITE_KINDS
+ STICKUP_CAM_GEN3_KINDS
+ ELITE_CAM_140_KINDS
+ ELITE_CAM_360_KINDS
)
return False

Expand Down