Improve DataUpdateCoordinator typing in integrations (2) (#84656)
This commit is contained in:
parent
1de41ab123
commit
06db5476e4
9 changed files with 26 additions and 21 deletions
|
@ -215,8 +215,7 @@ class AwairSensor(CoordinatorEntity[AwairDataUpdateCoordinator], SensorEntity):
|
|||
@property
|
||||
def _air_data(self) -> AirData | None:
|
||||
"""Return the latest data for our device, or None."""
|
||||
result: AwairResult | None = self.coordinator.data.get(self._device.uuid)
|
||||
if result:
|
||||
if result := self.coordinator.data.get(self._device.uuid):
|
||||
return result.air_data
|
||||
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue