BME680 gas resistance values

from a room where people smoke
image

1 Like

I know, this is a very old discussion, but I am confused:

In the official ESPHome documentation, there is the lambda-example:

  - platform: template
    name: "BME680 Indoor Air Quality"
    id: iaq
    icon: "mdi:gauge"
    # calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh]
    lambda: |-
      return log(id(gas_resistance).state) + 0.04 *  id(humidity).state;
    state_class: "measurement"

(Source)

Isn’t the comment # calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh] giving a different formula then actually calculated in the lambda?!

What is best practice: do you go with the BSCE-configuration or the general configuration?

Would be nice, if someone could clarify this.