From d257fff9cec9af2dca86451c59bf796fc4294c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 6 Dec 2019 19:54:11 +0200 Subject: [PATCH] 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". --- homeassistant/components/upnp/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/upnp/sensor.py b/homeassistant/components/upnp/sensor.py index 4c85e904b1d..7b5071aabd3 100644 --- a/homeassistant/components/upnp/sensor.py +++ b/homeassistant/components/upnp/sensor.py @@ -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."""