Use assignment expressions 19 (#57968)
This commit is contained in:
parent
786e1f9b6a
commit
ff853b2d53
23 changed files with 24 additions and 51 deletions
|
@ -116,8 +116,7 @@ class PyLoadSensor(SensorEntity):
|
|||
)
|
||||
return
|
||||
|
||||
value = self.api.status.get(self.type)
|
||||
if value is None:
|
||||
if (value := self.api.status.get(self.type)) is None:
|
||||
_LOGGER.warning("Unable to locate value for %s", self.type)
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue