Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Remove usage of Bsec helper class (#31)
Browse files Browse the repository at this point in the history
This removes usage of the Bosch provided Bsec helper class and
instead interfaces more directly with the underlying library.
Most importantly this allows removal of the forced delay within
the component loop which was causing various problems within the
ESPHome ecosystem.

Unfortunately due to the added timing complexities this does mean
that I have removed support for reading from multiple sensors as it
would take considerable extra effort to appropriately manage the
bsec library state.
  • Loading branch information
trvrnrth authored Jan 27, 2021
1 parent f7f46d7 commit df37a76
Show file tree
Hide file tree
Showing 4 changed files with 319 additions and 150 deletions.
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,6 @@ text_sensor:
name: "BME680 IAQ Accuracy"
```
## Multiple sensors
By defining multiple platform instances it is possible to read from multiple sensors.
```yaml
bme680_bsec:
- id: bme680_one
address: 0x76
- id: bme680_two
address: 0x77

sensor:
- platform: bme680_bsec
bme680_bsec_id: bme680_one
temperature:
name: "BME680 One Temperature"
- platform: bme680_bsec
bme680_bsec_id: bme680_two
temperature:
name: "BME680 Two Temperature"
```
## Indoor Air Quality (IAQ) Measurement
Indoor Air Quality measurements are expressed in the IAQ index scale with 25IAQ corresponding to typical good air and 250IAQ
indicating typical polluted air after calibration.
Expand All @@ -151,4 +131,4 @@ of the following values:
- `Calibrated`: BSEC calibrated successfully.

Every `state_save_interval`, or as soon thereafter as full calibration is reached, the current algorithm state is saved to flash
so that the process does not have to start from zero on device restart.
so that the process does not have to start from zero on device restart.
1 change: 0 additions & 1 deletion bme680_bsec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
CODEOWNERS = ['@trvrnrth']
DEPENDENCIES = ['i2c']
AUTO_LOAD = ['sensor', 'text_sensor']
MULTI_CONF = True

CONF_BME680_BSEC_ID = 'bme680_bsec_id'
CONF_TEMPERATURE_OFFSET = 'temperature_offset'
Expand Down
Loading

0 comments on commit df37a76

Please sign in to comment.