EN :
The purpose of this custom integration is to have additional information when weighing yourself with a Xiaomi Mi Scale (or any other smart scale). The input sensors for the custom integration are weight
and optionally impedance
(Mi Scale V2 only). You can use ESPHome or BLE monitor to collect the required data via Bluetooth. The calculations are done in the body_metrics.py
file. The configuration is in bodymiscale.yaml
where you define name
, weight
, height
, age
, gender
and impedance
(only for Mi Scale V2).
FR :
Le but de ce composant est d'avoir des informations supplémentaires lorsque l'on se pese avec une balance connectée Miscale Xiaomi. Actuellement le poids est envoyé sur Hassio avec un ESPHome ou BLE monitor. Le calculateur est le fichier body_metrics.py
. La base de données est dans le fichier bodymiscale.yaml
on y retrouve name
, le poids
, la taille
, l'age
, le genre
et l'impedance
(uniquement pour la Mi Scale V2). Le nom du composant devra être bodymiscale.username
DE :
Der Zweck dieser benutzerdefinierten Integration besteht darin, beim Wiegen mit einer Xiaomi Mi-Waage (oder einer anderen intelligenten Waage) zusätzliche Informationen zu erhalten. Die Sensoren für die benutzerdefinierte Integration sind "Gewicht" und optional "Impedanz" (nur Mi Scale V2). Sie können ESPHome oder BLE monitor verwenden, um die erforderlichen Daten über Bluetooth zu erhalten. Die Berechnungen erfolgen in der Datei body_metrics.py
. Die Konfiguration befindet sich in bodymiscale.yaml
wo Sie name
, weight
, height
, age
, gender
und impedance
definieren (nur für Mi Scale V2).
The generated data is :
- Model Miscale
- Weight
- Height
- Years
- Gender
- Bmi
- Basal metabolism
- Visceral fat
- Ideal weight
- Bmi label
- Model Miscale
- Weight
- Height
- Years
- Gender
- Bmi
- Basal metabolism
- Visceral fat
- Ideal weight
- Bmi label
- Lean body mass
- Body fat
- Water
- Bone mass
- Muscle mass
- Fat mass ideal
- Protein
- Body type
- Search "Bodymiscale" recently added Component under Integrations in the HACS Store tab
- You can install it manually. Simply copy and paste the contents of the
bodymiscale/custom_components
folder in yourconfig/custom_components
. For example, you will get the file__init __.Py
in the following path:/config/custom_components/bodymiscale/__init__. py
.
key | type | description |
---|---|---|
plateform (Required) | string | bodymiscale |
name (Required) | string | Custom name for the sensor. yourname |
weight (Required) | sensors / sensor.weight_ | Your sensor returning your weight. |
impedance (Optional) | sensors / sensor.impedance_ | Your sensor returning your impedance. |
height (Required) | number | Your height in cm. |
born (Required) | string | Your birthday. "1990-04-10" |
gender (Required) | string | female or male. "male" |
Model (Optional) | string | Define the scale model."181D" or "181B" . |
Configuration YAML [configuration.yaml]
bodymiscale: !include components/bodymiscale.yaml
Create a file in /config/components/bodymiscale.yaml
.
Configuration with default settings: [bodymiscale.yaml]
yourname:
sensors:
weight: sensor.weight_aurelien
height: 176
born: "1990-04-10"
gender: "male"
model_miscale: "181D"
Configuration with impedance (miscale2) settings: [bodymiscale.yaml]
yourname:
sensors:
weight: sensor.weight_aurelien
impedance: sensor.impedance_aurelien
height: 176
born: "1990-04-10"
gender: "male"
model_miscale: "181B"
- Update readme: default integration in Hacs is available
- Update iot_class (thank you @edenhaus)
Update for default integration in Hacs
Update to fix startup errors (thank you @stefangries )
Adding body score (thank you @alinelena )
Update for the "181B" model: display the minimum score if the impedance sensor is unavailable.
spelling update: Lack-exerscise => Lack-exercise
- Update decimal by @typxxi (Thanks)
- Update readme by @typxxi (Thanks)
- Use snake_case format for attribute names (thanks to Pavel Popov dckiller51#13)
- Rename HomeAssistantType —> HomeAssistant for integrations n*- p* #49559
- Fixed a startup error.
- Update readme by @Ernst79 (Thanks)
Delete the units for the future custom card.
Implantation of calculations. Thanks to lolouk44. I took the liberty of taking back these files.
First version. Thanks to the designer of the component plant of homeassistant.