Return attribute dict directly without temporary variable (#41206)

This commit is contained in:
springstan authored and GitHub committed 2020-10-05 12:51:48 +02:00
1 parent cf5c99d2a9
commit 038c05d0ee
23 files changed
+27 -60

No files matched your search

+1 -2
View File
@@ -78,12 +78,11 @@ class Filesize(Entity):
@property
def device_state_attributes(self):
"""Return other details about the sensor state."""
attr = {
return {
"path": self._path,
"last_updated": self._last_updated,
"bytes": self._size,
}
return attr
@property
def unit_of_measurement(self):