Use assignment expressions [A-I] (#66880)

This commit is contained in:
Marc Mueller 2022-02-19 17:21:26 +01:00 committed by GitHub
parent 6e49b0e122
commit 4f20a8023b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 20 additions and 43 deletions

View file

@ -146,8 +146,7 @@ class LocalAdaxDevice(ClimateEntity):
async def async_set_temperature(self, **kwargs):
"""Set new target temperature."""
temperature = kwargs.get(ATTR_TEMPERATURE)
if temperature is None:
if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
return
await self._adax_data_handler.set_target_temperature(temperature)