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
|
@ -255,8 +255,7 @@ class HikvisionBinarySensor(BinarySensorEntity):
|
|||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attr = {}
|
||||
attr[ATTR_LAST_TRIP_TIME] = self._sensor_last_update()
|
||||
attr = {ATTR_LAST_TRIP_TIME: self._sensor_last_update()}
|
||||
|
||||
if self._delay != 0:
|
||||
attr[ATTR_DELAY] = self._delay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue