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
@@ -5,6 +5,7 @@ import logging
|
||||
from pybotvac.exceptions import NeatoRobotException
|
||||
|
||||
from homeassistant.components.sensor import DEVICE_CLASS_BATTERY
|
||||
from homeassistant.const import UNIT_PERCENTAGE
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
|
||||
@@ -83,7 +84,7 @@ class NeatoSensor(Entity):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return unit of measurement."""
|
||||
return "%"
|
||||
return UNIT_PERCENTAGE
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
|
||||
Reference in new issue
Block a user