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
@@ -142,7 +142,7 @@ class SimulatedSensor(Entity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return other details about the sensor state."""
|
||||
attr = {
|
||||
return {
|
||||
"amplitude": self._amp,
|
||||
"mean": self._mean,
|
||||
"period": self._period,
|
||||
@@ -151,4 +151,3 @@ class SimulatedSensor(Entity):
|
||||
"seed": self._seed,
|
||||
"relative_to_epoch": self._relative_to_epoch,
|
||||
}
|
||||
return attr
|
||||
Reference in new issue
Block a user