Code cleanup for nest device info (#99511)

This commit is contained in:
Allen Porter 2023-09-02 10:38:41 -07:00 committed by GitHub
parent c3841f8734
commit 1048f47a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,10 +66,7 @@ class NestDeviceInfo:
@property
def device_model(self) -> str | None:
"""Return device model information."""
# The API intentionally returns minimal information about specific
# devices, instead relying on traits, but we can infer a generic model
# name based on the type
return DEVICE_TYPE_MAP.get(self._device.type or "", None)
return DEVICE_TYPE_MAP.get(self._device.type) if self._device.type else None
@property
def suggested_area(self) -> str | None: