From 47671ad2b7b735ffdbe3be22b7ee8ed34fccbf97 Mon Sep 17 00:00:00 2001 From: Josh Dev <1900843+JoshDev@users.noreply.github.com> Date: Fri, 29 Dec 2023 18:27:33 -0500 Subject: [PATCH] Add support for empiretech doorbell (#323) --- custom_components/dahua/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/dahua/__init__.py b/custom_components/dahua/__init__.py index 44bd490..ad64ff0 100755 --- a/custom_components/dahua/__init__.py +++ b/custom_components/dahua/__init__.py @@ -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()