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

@@ -173,9 +173,7 @@ class ImageProcessingFaceEntity(ImageProcessingEntity):
@property
def state_attributes(self):
"""Return device specific state attributes."""
attr = {ATTR_FACES: self.faces, ATTR_TOTAL_FACES: self.total_faces}
return attr
return {ATTR_FACES: self.faces, ATTR_TOTAL_FACES: self.total_faces}
def process_faces(self, faces, total):
"""Send event with detected faces and store data."""