Return attribute dict directly without temporary variable v2 (#41271)

This commit is contained in:
springstan 2020-10-06 16:55:16 +02:00 committed by GitHub
parent 33e69fe4bf
commit 513f03eb1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 90 additions and 124 deletions

View file

@ -203,8 +203,7 @@ class IntegrationSensor(RestoreEntity):
@property
def device_state_attributes(self):
"""Return the state attributes of the sensor."""
state_attr = {ATTR_SOURCE_ID: self._sensor_source_id}
return state_attr
return {ATTR_SOURCE_ID: self._sensor_source_id}
@property
def icon(self):