From 1df89bd4e473cc982cb24f2f797fbc4768d41e1c Mon Sep 17 00:00:00 2001 From: dckiller51 <53062806+dckiller51@users.noreply.github.com> Date: Sun, 6 Jun 2021 23:51:28 +0200 Subject: [PATCH] Update const.py - Use snake_case format for attribute names (thanks to Pavel Popov https://github.com/dckiller51/bodymiscale/pull/13) --- custom_components/bodymiscale/const.py | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/custom_components/bodymiscale/const.py b/custom_components/bodymiscale/const.py index fa2b295..5395280 100644 --- a/custom_components/bodymiscale/const.py +++ b/custom_components/bodymiscale/const.py @@ -20,11 +20,11 @@ ATTR_BORN = "born" ATTR_GENDER = "gender" ATTR_AGE = "age" -ATTR_BMI = "BMI" -ATTR_BMR = "Basal metabolism" -ATTR_VISCERAL = "Visceral fat" -ATTR_IDEAL = "Ideal" -ATTR_BMILABEL = "BMI label" +ATTR_BMI = "bmi" +ATTR_BMR = "basal_metabolism" +ATTR_VISCERAL = "visceral_fat" +ATTR_IDEAL = "ideal" +ATTR_BMILABEL = "bmi_label" # Constants for Miscale 2 READING_IMPEDANCE = "impedance" @@ -32,16 +32,16 @@ CONF_MIN_IMPEDANCE = f"min_{READING_IMPEDANCE}" CONF_MAX_IMPEDANCE = f"max_{READING_IMPEDANCE}" ATTR_IMPEDANCE = "impedance" -ATTR_LBM = "Lean body mass" -ATTR_FAT = "Body fat" -ATTR_WATER = "Water" -ATTR_BONES = "Bone mass" -ATTR_MUSCLE = "Muscle mass" -ATTR_FATMASSTOLOSE = "Fat mass to lose" -ATTR_FATMASSTOGAIN = "Fat mass to gain" -ATTR_PROTEIN = "Protein" -ATTR_BODY = "Body type" -ATTR_METABOLIC = "Metabolic age" +ATTR_LBM = "lean_body_mass" +ATTR_FAT = "body_fat" +ATTR_WATER = "water" +ATTR_BONES = "bone_mass" +ATTR_MUSCLE = "muscle_mass" +ATTR_FATMASSTOLOSE = "fat_mass_to_lose" +ATTR_FATMASSTOGAIN = "fat_mass_to_gain" +ATTR_PROTEIN = "protein" +ATTR_BODY = "body_type" +ATTR_METABOLIC = "metabolic_age" # Defaults DEFAULT_NAME = "bodymiscale"