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,9 +1,13 @@
|
||||
"""Support for Home Assistant iOS app sensors."""
|
||||
from homeassistant.components import ios
|
||||
from homeassistant.const import UNIT_PERCENTAGE
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.icon import icon_for_battery_level
|
||||
|
||||
SENSOR_TYPES = {"level": ["Battery Level", "%"], "state": ["Battery State", None]}
|
||||
SENSOR_TYPES = {
|
||||
"level": ["Battery Level", UNIT_PERCENTAGE],
|
||||
"state": ["Battery State", None],
|
||||
}
|
||||
|
||||
DEFAULT_ICON_LEVEL = "mdi:battery"
|
||||
DEFAULT_ICON_STATE = "mdi:power-plug"
|
||||
|
||||
Reference in new issue
Block a user