Return attribute dict directly without temporary variable (#41206)
This commit is contained in:
1 parent
cf5c99d2a9
commit
038c05d0ee
23 files changed
+27
-60
No files matched your search
@@ -175,7 +175,7 @@ class BOMCurrentSensor(Entity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
attr = {
|
||||
return {
|
||||
ATTR_ATTRIBUTION: ATTRIBUTION,
|
||||
ATTR_LAST_UPDATE: self.bom_data.last_updated,
|
||||
ATTR_SENSOR_ID: self._condition,
|
||||
@@ -184,8 +184,6 @@ class BOMCurrentSensor(Entity):
|
||||
ATTR_ZONE_ID: self.bom_data.latest_data["history_product"],
|
||||
}
|
||||
|
||||
return attr
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the units of measurement."""
|
||||
|
||||
Reference in new issue
Block a user