Use MASS_KILOGRAMS constant (#34052)

This commit is contained in:
springstan 2020-04-12 19:45:50 +02:00 committed by GitHub
parent b160f1c813
commit d454c6a43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View file

@ -1,5 +1,10 @@
"""Constants for the Garmin Connect integration."""
from homeassistant.const import DEVICE_CLASS_TIMESTAMP, TIME_MINUTES, UNIT_PERCENTAGE
from homeassistant.const import (
DEVICE_CLASS_TIMESTAMP,
MASS_KILOGRAMS,
TIME_MINUTES,
UNIT_PERCENTAGE,
)
DOMAIN = "garmin_connect"
ATTRIBUTION = "Data provided by garmin.com"
@ -309,12 +314,12 @@ GARMIN_ENTITY_LIST = {
DEVICE_CLASS_TIMESTAMP,
False,
],
"weight": ["Weight", "kg", "mdi:weight-kilogram", None, False],
"weight": ["Weight", MASS_KILOGRAMS, "mdi:weight-kilogram", None, False],
"bmi": ["BMI", "", "mdi:food", None, False],
"bodyFat": ["Body Fat", UNIT_PERCENTAGE, "mdi:food", None, False],
"bodyWater": ["Body Water", UNIT_PERCENTAGE, "mdi:water-percent", None, False],
"bodyMass": ["Body Mass", "kg", "mdi:food", None, False],
"muscleMass": ["Muscle Mass", "kg", "mdi:dumbbell", None, False],
"bodyMass": ["Body Mass", MASS_KILOGRAMS, "mdi:food", None, False],
"muscleMass": ["Muscle Mass", MASS_KILOGRAMS, "mdi:dumbbell", None, False],
"physiqueRating": ["Physique Rating", "", "mdi:numeric", None, False],
"visceralFat": ["Visceral Fat", "", "mdi:food", None, False],
"metabolicAge": ["Metabolic Age", "", "mdi:calendar-heart", None, False],