Delint recent change to evohome (#38294)

This commit is contained in:
David Bonnes 2020-07-27 22:17:07 +01:00 committed by GitHub
parent 561e4b537a
commit bea1570354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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"]