From bea1570354b58c08f26577ad473340cc3c9421f6 Mon Sep 17 00:00:00 2001 From: David Bonnes Date: Mon, 27 Jul 2020 22:17:07 +0100 Subject: [PATCH] Delint recent change to evohome (#38294) --- homeassistant/components/evohome/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/evohome/__init__.py b/homeassistant/components/evohome/__init__.py index f54bba1c58db..f429f5bd2f13 100644 --- a/homeassistant/components/evohome/__init__.py +++ b/homeassistant/components/evohome/__init__.py @@ -614,9 +614,11 @@ class EvoChild(EvoDevice): @property def current_temperature(self) -> Optional[float]: """Return the current temperature of a Zone.""" - if self._evo_broker.temps: - if self._evo_broker.temps[self._evo_device.zoneId] != 128: - return self._evo_broker.temps[self._evo_device.zoneId] + if ( + self._evo_broker.temps + and self._evo_broker.temps[self._evo_device.zoneId] != 128 + ): + return self._evo_broker.temps[self._evo_device.zoneId] if self._evo_device.temperatureStatus["isAvailable"]: return self._evo_device.temperatureStatus["temperature"]