mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Round download speed for nzbget sensor (#2255)
This commit is contained in:
parent
5223d20668
commit
1c637558bf
@ -158,7 +158,7 @@ class NZBGetSensor(Entity):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if "DownloadRate" in self.type and value > 0:
|
if "DownloadRate" in self.type and value > 0:
|
||||||
# Convert download rate from bytes/s to mb/s
|
# Convert download rate from Bytes/s to MBytes/s
|
||||||
self._state = value / 1024 / 1024
|
self._state = round(value / 1024 / 1024, 2)
|
||||||
else:
|
else:
|
||||||
self._state = value
|
self._state = value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user