Custom_component bodymiscale [For Xiaomi Miscale 1& 2] Esphome or BLE Monitor

Hello,

Does that answer your question?

Actually, I understood after posting this that I need to give the same entity names for the weight and impedance between the bodymiscale and the blemonitor integrations.

1 Like

Hello,

this is my card for MIScale:

You can make template sensors for the attributes if you change it to “easy readable” format in the /config/custom_components/bodymiscale/const.py.

For example ATTR_FATMASSTOLOSE = “Fat mass to lose” has to be changed to ATTR_FATMASSTOLOSE = “fat_mass_to_lose”

There is only one question left, which is the right evaulation, the results in the official app Zepp or these ones? Because lot of result differrent between the results.

1 Like

Hello, I did not understand the meaning of your example

I should put the attributes with “_”

For example ATTR_FATMASSTOLOSE = “Fat mass to lose” has to be changed to ATTR_FATMASSTOLOSE = “fat_mass_to_lose”

If you make a template sensor with originial attribute, for example:

      scale_fat_mass_to_lose:
        friendly_name: lefogyasztandó zsír
        value_template: "{{ states.bodymiscale.merleg.attributes.Fat mass to lose }}"
        unit_of_measurement: "kg" 

then you got an error and the sensor can not be compiled. Maybe the spaces between the words cause the problem.

Ok You must use like this.

{{ state_attr('bodymiscale.merleg', 'Fat mass to lose') }}

Look here also I put an example of manual card. You can change the name and the unit

Another card in progress

I tried it, the attribute fat_mass_to_lose is changed back to Fat mass to lose in both files, in the const.py and the template sensor too.
I got this error in this case:

Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:486
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 12:33:43 (1 occurrences)
Last logged: 12:33:43

Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: expected name or number) for dictionary value @ data['sensors']['scale_fat_mass_to_lose']['value_template']. Got "{{ states.bodymiscale.merleg.attributes.'Fat mass to lose' }}". (See ?, line ?).

Perhabs it is working with picture elements but doesn’t work as template sensor…? :thinking:

hello, this is my settings. where do you think is wrong?

@dckiller51 - that calculation for age did not take into account leap years.

I have dropped a PR to correct this and also one to suggest the ReadME is explicit on the format for the DOB - YYY-MM-DD.

HTH

Hello,
I am trying to update the bodymiscale integration to v 1.1.4 but I am getting this error after the update.
Obviously I can’t restart home assistant but luckly I can restore the backup.error when trying to update bodymiscale

The Passive BLE Monitor integration has been improved such that the impedance and weight sensors for the V2 scale now report almost simultaneously. Passive BLE Monitor integration - #410 by Ernst

I’m still seeing duplicate updates from this component though.Double reports if the two sensors are updated at different times · Issue #51 · dckiller51/bodymiscale · GitHub

V2.0.0 not triggering correctly when sensors change.

I have 2 scales defined and both updated at the same time as one of the sets of sensors updated.

Reverted to 1.1.5 and all OK @dckiller51

hello, is this card removed? i need it!!!

hey there. I really want to use mi-scale with multiple persons.
But how?

How can I use the bodymiscale integration (setup from gui) wiht multiple persons · Discussion #83 · dckiller51/bodymiscale (github.com)

Do you have still this problem with the current version 2.1.1?

I’ve not updated it. From the response I had (V2.0.0 does not trigger correctly when sensors updated · Issue #65 · dckiller51/bodymiscale · GitHub), I need to change the trigger on Node-RED and I haven’t got around to looking at it.

Can these integration be updated using new Bluetooth integration since 2022.8 ?

BLE monitor Will be converted to an Bluetooth integration, including the miscales. But it will take some time.

1 Like

Thank you! This is the answer I was praying for!