#Need help creating a calculation entity

1 messages · Page 1 of 1 (latest)

errant olive
#

I need help creating an entity that does the following:

([sensor.scale_mass]-(-4+0.6*(184^(2)/[sensor.scale_impedance])+0.34*[sensor.scale_mass]+0.13*[current age in years]))/[sensor.scale_mass]

This is the best equation I've her found for calculating an estimate of body fat percentage based on electrical impedance. Most equations seem to be proprietary and secret. The 184 is my height in cm, but that's not likely to change so it can just be a fixed number.

I'm not sure how to go about doing this. I need help first creating an entity that reports my current age in years (ideally with decimal places rather than truncated) and to then create an entity based on the above calculation.

#

Related: I'd also like to create an entity that uses [sensor.scale_mass]/184^(2) to calculate BMI.