mirror of
https://github.com/elisspace/core.git
synced 2026-10-05 16:56:19 +00:00
Use assignment expressions 19 (#57968)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user