This commit is contained in:
J. Nick Koston 2023-11-19 10:00:55 -06:00
parent c076bc72ff
commit 542554e5d4
No known key found for this signature in database

View File

@ -74,7 +74,7 @@ def get_device_class_from_info(info: Dict[str, Any]) -> Type[SmartDevice]:
raise SmartDeviceException("No 'system' or 'get_sysinfo' in response") raise SmartDeviceException("No 'system' or 'get_sysinfo' in response")
sysinfo: Dict[str, Any] = info["system"]["get_sysinfo"] sysinfo: Dict[str, Any] = info["system"]["get_sysinfo"]
type_ = sysinfo.get("type", sysinfo.get("mic_type")) type_: Optional[str] = sysinfo.get("type", sysinfo.get("mic_type"))
if type_ is None: if type_ is None:
raise SmartDeviceException("Unable to find the device type field!") raise SmartDeviceException("Unable to find the device type field!")