Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
@@ -18,6 +18,7 @@ from homeassistant.const import (
|
||||
MASS_MILLIGRAMS,
|
||||
TIME_MILLISECONDS,
|
||||
TIME_MINUTES,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -91,11 +92,11 @@ FITBIT_RESOURCES_LIST = {
|
||||
],
|
||||
"activities/tracker/steps": ["Tracker Steps", "steps", "walk"],
|
||||
"body/bmi": ["BMI", "BMI", "human"],
|
||||
"body/fat": ["Body Fat", "%", "human"],
|
||||
"body/fat": ["Body Fat", UNIT_PERCENTAGE, "human"],
|
||||
"body/weight": ["Weight", "", "human"],
|
||||
"devices/battery": ["Battery", None, None],
|
||||
"sleep/awakeningsCount": ["Awakenings Count", "times awaken", "sleep"],
|
||||
"sleep/efficiency": ["Sleep Efficiency", "%", "sleep"],
|
||||
"sleep/efficiency": ["Sleep Efficiency", UNIT_PERCENTAGE, "sleep"],
|
||||
"sleep/minutesAfterWakeup": ["Minutes After Wakeup", TIME_MINUTES, "sleep"],
|
||||
"sleep/minutesAsleep": ["Sleep Minutes Asleep", TIME_MINUTES, "sleep"],
|
||||
"sleep/minutesAwake": ["Sleep Minutes Awake", TIME_MINUTES, "sleep"],
|
||||
|
||||
Reference in New Issue
Block a user