mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Correct unit conversion for OneDrive quota display (#140337)
* Correct unit conversion for OneDrive quota display * Convert OneDrive quota values from bytes to GiB in coordinator and update strings
This commit is contained in:
parent
427e1abdae
commit
91438088a0
@ -88,8 +88,8 @@ class OneDriveUpdateCoordinator(DataUpdateCoordinator[Drive]):
|
|||||||
),
|
),
|
||||||
translation_key=key,
|
translation_key=key,
|
||||||
translation_placeholders={
|
translation_placeholders={
|
||||||
"total": str(drive.quota.total),
|
"total": f"{drive.quota.total / (1024**3):.2f}",
|
||||||
"used": str(drive.quota.used),
|
"used": f"{drive.quota.used / (1024**3):.2f}",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return drive
|
return drive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user