Use "kB" and "s" as UPnP/IGD units (#29552)
For consistency with various existing components, and they're more commonly used and compact than "kbyte" and "sec".
This commit is contained in:
parent
c9415ab75d
commit
d257fff9ce
1 changed files with 2 additions and 2 deletions
|
@ -189,7 +189,7 @@ class PerSecondUPnPIGDSensor(UpnpSensor):
|
|||
@property
|
||||
def unit_of_measurement(self) -> str:
|
||||
"""Return the unit of measurement of this entity, if any."""
|
||||
return f"{self.unit}/sec"
|
||||
return f"{self.unit}/s"
|
||||
|
||||
def _is_overflowed(self, new_value) -> bool:
|
||||
"""Check if value has overflowed."""
|
||||
|
@ -222,7 +222,7 @@ class KBytePerSecondUPnPIGDSensor(PerSecondUPnPIGDSensor):
|
|||
@property
|
||||
def unit(self) -> str:
|
||||
"""Get unit we are measuring in."""
|
||||
return "kbyte"
|
||||
return "kB"
|
||||
|
||||
async def _async_fetch_value(self) -> float:
|
||||
"""Fetch value from device."""
|
||||
|
|
Loading…
Add table
Reference in a new issue