Skip to content

Commit

Permalink
Add support for empiretech doorbell (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshDev authored Dec 29, 2023
1 parent c6a2603 commit 47671ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/dahua/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,16 @@ def is_doorbell(self) -> bool:
""" Returns true if this is a doorbell (VTO) """
m = self.model.upper()
return m.startswith("VTO") or m.startswith("DH-VTO") or (
"NVR" not in m and m.startswith("DHI")) or self.is_amcrest_doorbell()
"NVR" not in m and m.startswith("DHI")) or self.is_amcrest_doorbell() or self.is_empiretech_doorbell()

def is_amcrest_doorbell(self) -> bool:
""" Returns true if this is an Amcrest doorbell """
return self.model.upper().startswith("AD")

def is_empiretech_doorbell(self) -> bool:
""" Returns true if this is an EmpireTech doorbell """
return self.model.upper().startswith("DB2X")

def is_flood_light(self) -> bool:
""" Returns true if this camera is an floodlight camera (eg.ASH26-W) """
m = self.model.upper()
Expand Down

0 comments on commit 47671ad

Please sign in to comment.