tomekkleszcz / homebridge-electrolux-devices

Homebridge plugin for Electrolux devices
Apache License 2.0
21 stars 4 forks source link

feat: convert tvoc to voc density #18

Closed mafredri closed 7 months ago

mafredri commented 1 year ago

(This PR targets my prettier branch, ignore the first 3 commits.)

This commit adds support for converting TVOC to VOC Density, as tracked by HomeKit. This conversion does require giving the target molecular weight as input, though. Formeldahyde was picked as the default gas weight since it's a common household gas, but we let the user configure the gas weight just in case they have a better idea of what they want to track.

For a TVOC of 300 ppb at 25 C and using the weight of formeldahyde, we get 368 μg/m^3.

tomekkleszcz commented 7 months ago

Hi @mafredri Would you be able to update your remote branch and remove other changes you did here, so this PR would contain only code which converts TVOC to VOC density? After that, I would be happy to merge it.

tomekkleszcz commented 7 months ago

Resolved in #42, added you in release as a contributor.