Round average price for Tibber (#18784)
This commit is contained in:
1 parent
07a7ee0ac7
commit
8c9a39845c
1 file changed
+1
-1
@@ -152,7 +152,7 @@ class TibberSensorElPrice(Entity):
|
||||
sum_price += price_total
|
||||
self._state = state
|
||||
self._device_state_attributes['max_price'] = max_price
|
||||
self._device_state_attributes['avg_price'] = sum_price / num
|
||||
self._device_state_attributes['avg_price'] = round(sum_price / num, 3)
|
||||
self._device_state_attributes['min_price'] = min_price
|
||||
return state is not None
|
||||
|
||||
|
||||
Reference in new issue
Block a user