Update black to 23.1.0 (#87188)
This commit is contained in:
parent
f7666239ff
commit
5e81d28116
312 changed files with 299 additions and 475 deletions
|
@ -245,7 +245,7 @@ class DerivativeSensor(RestoreEntity, SensorEntity):
|
|||
derivative = new_derivative
|
||||
else:
|
||||
derivative = Decimal(0)
|
||||
for (start, end, value) in self._state_list:
|
||||
for start, end, value in self._state_list:
|
||||
weight = calculate_weight(start, end, new_state.last_updated)
|
||||
derivative = derivative + (value * Decimal(weight))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue