mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix decimals in uptime sensor
This commit is contained in:
parent
b292a4af3f
commit
ebce666264
@ -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…
x
Reference in New Issue
Block a user