Lovelace: Body Miscale Card 5.6.0

I had summed it up for all those who might come across that topic too, where the BodyMiscale Card would not seem to work but that might have been caused by the sensor and not the card like in my case you had referred to.

And far above when I had started my topic I added an UPDATE section to my initial comment that is linking to that explanation I had written for you. That would make it a lot shorter to get behind. I am not into that whole ESP world cause when I had bought 2 back then our energy monitor had to been replaced and was no longer needed.

What is the purpose of that ESP32 integration ?
Is it a kind of bridge connecting the scale to the esp32 that hen connects via WiFi or is it that logic that switches between accounts based on measurement results or can / is it both ?

thx

I have an issue with the buttons (for more details and changing users) in firefox and the home assistant iOS app. They simply donā€™t do anything. Not even an error in the browser console.

Is anyone else experiencing the same? (i scanned the entire thread but didnā€™t see anyone mention it)
I already created an issue (before I found this thread).

New version available.

Small screen of the next version with integration of bar card for the score part.

3 Likes

Can someone tell me if itā€™s still possible to find this card in HACS? I have the integration running and working great just canā€™t find the card in HACS. Is manual install for now only supported?

Hello, you must add the address using the 3 dots at the top right then add a personal deposit.

1 Like

Thanks. When I tried to add https://github.com/dckiller51/lovelace-body-miscale-card as a custom frontend repo, HA popped up and said the card ā€œwas already in the storeā€ and then whamo, it appeared. Installed now, thank you.

@thomasloven hello, In view of your expertise in the field of cards, I would like to ask you because I have a technical question on my card. I am missing an element that I wanted to put in place but that I am unable to implement. Do you have any idea how to set up several users selected by a switch.

Part of the code allows me to operate a service with a button. the ideal would be to place it here.

  renderButton(data: any) {
    if (!this.config.show_buttons) {
      return html``;
    }

    return data && data.show !== false
      ? html`<ha-icon-button
          @click="${() => this.callService(data.service, data.service_data)}"
          icon="${data.icon}"
          title="${data.label || ''}"
          style="${this.config.styles.icon}"
        ></ha-icon-button>`
      : null;
  }
export const buttons = {
  user1: {
    show: false,
    label: 'User1',
    icon: 'mdi:alpha-u-circle',
  },
  user2: {
    show: false,
    label: 'User2',
    icon: 'mdi:alpha-u-circle',
  },
  user3: {
    show: false,
    label: 'User3',
    icon: 'mdi:alpha-u-circle',
  },
  user4: {
    show: false,
    label: 'User4',
    icon: 'mdi:alpha-u-circle',
  },
  user5: {
    show: false,
    label: 'User5',
    icon: 'mdi:alpha-u-circle',
  },
};

Here I know that you are already very busy with all your projects but if you have an idea to help me. Thank you

Hi,

Thanks for the great work, but Iā€™m having some trouble.
Iā€™ve copied the icons to www/images/bodyscoreIcon.
But I canā€™t see them at all.

Can you look at what F12 select an element gives

Working on a Mac, there is no F12

I will look to suggest an update, Safari does not read .webp format

Hello,

Hi, thanks for the great work on this card.
Is it possible to force a translation? I have my HA set to English, but would like to have the card in Dutch (NL)

Hello, sorry we canā€™t force the translation. If you have an example of a card that does it I want to adapt it to this card.

A user updated my air-visual-card to use translation keyā€“maybe this will help you. You can look at this commit as an example. He also left some useful links on how to use localize function in HA.

Calling hass.localize() and passing the translation key based on the component translation: sensor.en.json
Explanation of how you can find the translation key can be found here: frontend-translations

I have installed and using this card, but I canā€™t figure out how to get 10 days graph on top as on your screenshot?
What Iā€™m missing?

Where to find the body png icons? The link from the github is broken
EDIT: found themā€¦

1 Like

Hi, in my environment the sensor of the weight, after the first update is not anymore updating while the non-stabilized one is regularly updated everytime i use the device. Can you tell me why and, more, which is the difference between the two sensors about the weight?

Got these errors this morning just after checking the weight:

2021-10-26 08:53:59 ERROR (MainThread) [homeassistant.helpers.event] Error while processing state change for sensor.ble_impedance_fa10531b57ec
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 269, in _async_state_change_dispatcher
    hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 433, in async_run_hass_job
    hassjob.target(*args)
  File "/config/custom_components/bodymiscale/__init__.py", line 167, in _state_changed_event
    self.state_changed(event.data.get("entity_id"), event.data.get("new_state"))
  File "/config/custom_components/bodymiscale/__init__.py", line 190, in state_changed
    self._update_state()
  File "/config/custom_components/bodymiscale/__init__.py", line 217, in _update_state
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 491, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/config/custom_components/bodymiscale/__init__.py", line 307, in state_attributes
    lib = body_metrics.bodyMetrics(weight, height, age, gender, impedance)
  File "/config/custom_components/bodymiscale/body_metrics.py", line 16, in __init__
    elif weight < 10 or weight > 200:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

And after this i got NaNKg in my lovelace cardā€¦
Any hints?