Return attribute dict directly without temporary variable (#41206)
This commit is contained in:
parent
cf5c99d2a9
commit
038c05d0ee
23 changed files with 27 additions and 60 deletions
|
@ -184,8 +184,7 @@ class MiFloraSensor(Entity):
|
|||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
attr = {ATTR_LAST_SUCCESSFUL_UPDATE: self.last_successful_update}
|
||||
return attr
|
||||
return {ATTR_LAST_SUCCESSFUL_UPDATE: self.last_successful_update}
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue