Skip to content

Commit f1cf58f

Browse files
authored
Merge pull request #80 from brianegge/brianegge-patch-1
Update __init__.py
2 parents c552d03 + 637efac commit f1cf58f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

custom_components/dahua/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ async def _async_update_data(self):
184184
data.update(response)
185185

186186
device_type = data.get("deviceType", None)
187+
# Lorex NVRs return deviceType=31, but the model is in the updateSerial
188+
# /cgi-bin/magicBox.cgi?action=getSystemInfo"
189+
# deviceType=31
190+
# processor=ST7108
191+
# serialNumber=ND0219110NNNNN
192+
# updateSerial=DHI-NVR4108HS-8P-4KS2
187193
if device_type in ["IP Camera", "31"] or device_type is None:
188194
# Some firmwares put the device type in the "updateSerial" field. Weird.
189195
device_type = data.get("updateSerial", None)

0 commit comments

Comments
 (0)