Fix decimals in uptime sensor
This commit is contained in:
parent
b292a4af3f
commit
ebce666264
1 changed files with 1 additions and 1 deletions
|
@ -74,5 +74,5 @@ class UptimeSensor(Entity):
|
|||
if self.unit_of_measurement == 'days':
|
||||
div_factor *= 24
|
||||
delta = delta.total_seconds() / div_factor
|
||||
self._state = round(delta, 2)
|
||||
self._state = format(round(delta, 2), '.2f')
|
||||
_LOGGER.debug("New value: %s", delta)
|
||||
|
|
Loading…
Add table
Reference in a new issue