Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
1 parent
c7f128f286
commit
f1a0ca7cd3
155 files changed
+735
-459
No files matched your search
@@ -1,6 +1,6 @@
|
||||
"""Support for IKEA Tradfri sensors."""
|
||||
|
||||
from homeassistant.const import DEVICE_CLASS_BATTERY
|
||||
from homeassistant.const import DEVICE_CLASS_BATTERY, UNIT_PERCENTAGE
|
||||
|
||||
from .base_class import TradfriBaseDevice
|
||||
from .const import CONF_GATEWAY_ID, KEY_API, KEY_GATEWAY
|
||||
@@ -47,4 +47,4 @@ class TradfriSensor(TradfriBaseDevice):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit_of_measurement of the device."""
|
||||
return "%"
|
||||
return UNIT_PERCENTAGE
|
||||
Reference in new issue
Block a user