Fix assignment of amcrest camera model (#55266)
This commit is contained in:
parent
9da3fa5d75
commit
789f21c427
1 changed files with 4 additions and 3 deletions
|
@ -374,15 +374,16 @@ class AmcrestCam(Camera):
|
||||||
try:
|
try:
|
||||||
if self._brand is None:
|
if self._brand is None:
|
||||||
resp = self._api.vendor_information.strip()
|
resp = self._api.vendor_information.strip()
|
||||||
|
_LOGGER.debug("Assigned brand=%s", resp)
|
||||||
if resp.startswith("vendor="):
|
if resp.startswith("vendor="):
|
||||||
self._brand = resp.split("=")[-1]
|
self._brand = resp.split("=")[-1]
|
||||||
else:
|
else:
|
||||||
self._brand = "unknown"
|
self._brand = "unknown"
|
||||||
if self._model is None:
|
if self._model is None:
|
||||||
resp = self._api.device_type.strip()
|
resp = self._api.device_type.strip()
|
||||||
_LOGGER.debug("Device_type=%s", resp)
|
_LOGGER.debug("Assigned model=%s", resp)
|
||||||
if resp.startswith("type="):
|
if resp:
|
||||||
self._model = resp.split("=")[-1]
|
self._model = resp
|
||||||
else:
|
else:
|
||||||
self._model = "unknown"
|
self._model = "unknown"
|
||||||
if self._attr_unique_id is None:
|
if self._attr_unique_id is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue