Use assignment expressions 14 (#57939)

This commit is contained in:
Marc Mueller 2021-10-21 08:26:01 +02:00 committed by GitHub
parent 4eea618cc4
commit c979e89b70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 31 additions and 70 deletions

View file

@ -176,8 +176,7 @@ class LcnClimate(LcnEntity, ClimateEntity):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
temperature = kwargs.get(ATTR_TEMPERATURE)
if temperature is None:
if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
return
if not await self.device_connection.var_abs(