Dev questions
edenhaus opened this issue · comments
Hi @dckiller51,
first thank for this component. Currently I prepare the PR to add config flow for this component and I got some questions:
- In home-assistant/brands#2818 (comment) you say that the component can be used by any scale (I agree with you), so I suggest to rename to component to
bodyscale
or what do you think? - I will also remove the option scale model as we don't need it. If the use configures the impedance sensor, we calculate more attributes.
- Are the configuration options
min_weight
,max_weight
,min_impedance
,max_impedance
still used? There is no documentation about it and I suggest to remove them. I understand why you introduced them, but if there are two persons, we need to separate their readings outside this component (examples esphome, #11) and therefore these config options are useless imo.
After I have added the config flow support, it easy to add a sensor for each attribute (#40) and also fix #39, #37, #25.
What do you think?
Hello ,
I don't have a problem with the changes but it must be compatible with the card that goes with it https://github.com/dckiller51/lovelace-body-miscale-card.
For the configuration options min_weight, max_weight, min_impedance, max_impedance it allows to have a quick state.
https://community-assets.home-assistant.io/original/3X/a/c/ac505f58d1c54e97f02f633ae2b379ff9c7d66ef.png
I don't have a problem with the changes but it must be compatible with the card that goes with it https://github.com/dckiller51/lovelace-body-miscale-card.
That's of course, I use also this card :) The entity stays at it is only new will be added.
For the configuration options min_weight, max_weight, min_impedance, max_impedance it allows to have a quick state.
https://community-assets.home-assistant.io/original/3X/a/c/ac505f58d1c54e97f02f633ae2b379ff9c7d66ef.png
Sorry I didn't understand it. I understand, that when they impedance is negative it is not a valid value and therefore still a "impedance low" error state will be created. I would only delete the ability for the user to change this values and internal use the default values as specified in const.py
bodymiscale/custom_components/bodymiscale/const.py
Lines 53 to 56 in d5c03bf
Ok I thought you wanted to delete it. we can actually put it in hard.
I don't have a problem with the changes but it must be compatible with the card that goes with it https://github.com/dckiller51/lovelace-body-miscale-card.
We probably need also adjust the card in the future as HA development guidelines are saying the following:
https://developers.home-assistant.io/docs/core/entity#generic-properties
So probably after I have created a sensor for each attribute, we should adapt the card to use the new sensors and afterwards remove the old bodymiscale entity completely.
We don't have to hurry, but we should keep it on the radar.