Skip to content
Merged
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
1 change: 1 addition & 0 deletions ring_doorbell/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def from_name(name: str) -> RingCapability:
DOORBELL_PRO_2_KINDS = ["lpd_v4"]
DOORBELL_ELITE_KINDS = ["jbox_v1"]
DOORBELL_WIRED_KINDS = ["doorbell_graham_cracker"]
DOORBELL_BATTERY_KINDS = ["df_doorbell_clownfish"]
PEEPHOLE_CAM_KINDS = ["doorbell_portal"]
DOORBELL_GEN2_KINDS = ["cocoa_doorbell", "cocoa_doorbell_v2"]

Expand Down
5 changes: 5 additions & 0 deletions ring_doorbell/doorbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
DOORBELL_3_KINDS,
DOORBELL_3_PLUS_KINDS,
DOORBELL_4_KINDS,
DOORBELL_BATTERY_KINDS,
DOORBELL_ELITE_KINDS,
DOORBELL_EXISTING_DURATION_MAX,
DOORBELL_EXISTING_DURATION_MIN,
Expand Down Expand Up @@ -99,6 +100,8 @@ def model(self) -> str: # noqa: C901, PLR0911
return "Doorbell Elite"
if self.kind in DOORBELL_WIRED_KINDS:
return "Doorbell Wired"
if self.kind in DOORBELL_BATTERY_KINDS:
return "Battery Doorbell"
if self.kind in DOORBELL_GEN2_KINDS:
return "Doorbell (2nd Gen)"
if self.kind in PEEPHOLE_CAM_KINDS:
Expand All @@ -120,6 +123,7 @@ def has_capability(self, capability: RingCapability | str) -> bool: # noqa: PLR
+ DOORBELL_3_PLUS_KINDS
+ DOORBELL_4_KINDS
+ DOORBELL_GEN2_KINDS
+ DOORBELL_BATTERY_KINDS
+ PEEPHOLE_CAM_KINDS
)
if capability == RingCapability.KNOCK:
Expand All @@ -144,6 +148,7 @@ def has_capability(self, capability: RingCapability | str) -> bool: # noqa: PLR
+ DOORBELL_PRO_KINDS
+ DOORBELL_PRO_2_KINDS
+ DOORBELL_WIRED_KINDS
+ DOORBELL_BATTERY_KINDS
+ DOORBELL_GEN2_KINDS
+ DOORBELL_ELITE_KINDS
+ PEEPHOLE_CAM_KINDS
Expand Down