Use assignment expressions 27 (#58188)

This commit is contained in:
Marc Mueller 2021-10-22 11:29:21 +02:00 committed by GitHub
parent 83e45300c2
commit be201e3ebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 29 additions and 59 deletions

View file

@ -230,9 +230,8 @@ class EvoZone(EvoChild, EvoClimateEntity):
async def async_set_temperature(self, **kwargs) -> None:
"""Set a new target temperature."""
temperature = kwargs["temperature"]
until = kwargs.get("until")
if until is None:
if (until := kwargs.get("until")) is None:
if self._evo_device.setpointStatus["setpointMode"] == EVO_FOLLOW:
await self._update_schedule()
until = dt_util.parse_datetime(self.setpoints.get("next_sp_from", ""))