From 1048f47a915c3b89bdcac5dca54320b7535e1431 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 2 Sep 2023 10:38:41 -0700 Subject: [PATCH] Code cleanup for nest device info (#99511) --- homeassistant/components/nest/device_info.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/nest/device_info.py b/homeassistant/components/nest/device_info.py index 35e32ccf1bc..f269e3e89d6 100644 --- a/homeassistant/components/nest/device_info.py +++ b/homeassistant/components/nest/device_info.py @@ -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: