16 namespace bme680_bsec {
35 #define BME680_BSEC_SAMPLE_RATE_LOG(r) (r == SAMPLE_RATE_DEFAULT ? "Default" : (r == SAMPLE_RATE_ULP ? "ULP" : "LP")) 60 static std::vector<BME680BSECComponent *>
instances;
63 static void delay_ms(uint32_t period);
65 void setup()
override;
77 void publish_(
const bsec_output_t *outputs, uint8_t num_outputs);
106 std::queue<std::function<void()>>
queue_;
void set_co2_equivalent_sensor(sensor::Sensor *sensor)
text_sensor::TextSensor * iaq_accuracy_text_sensor_
SampleRate humidity_sample_rate_
sensor::Sensor * breath_voc_equivalent_sensor_
bsec_library_return_t bsec_status_
void set_supply_voltage(SupplyVoltage supply_voltage)
void set_pressure_sample_rate(SampleRate sample_rate)
void queue_push_(std::function< void()> &&f)
void publish_(const bsec_output_t *outputs, uint8_t num_outputs)
float temperature_offset_
static void delay_ms(uint32_t period)
float calc_sensor_sample_rate_(SampleRate sample_rate)
void set_gas_resistance_sensor(sensor::Sensor *sensor)
sensor::Sensor * pressure_sensor_
void set_humidity_sensor(sensor::Sensor *sensor)
void save_state_(uint8_t accuracy)
uint32_t millis_overflow_counter_
void set_pressure_sensor(sensor::Sensor *sensor)
static int8_t read_bytes_wrapper(uint8_t devid, uint8_t a_register, uint8_t *data, uint16_t len)
void set_iaq_accuracy_text_sensor(text_sensor::TextSensor *sensor)
uint32_t last_state_save_ms_
sensor::Sensor * co2_equivalent_sensor_
uint8_t bsec_state_data_[BSEC_MAX_STATE_BLOB_SIZE]
struct bme680_dev bme680_
void set_temperature_offset(float offset)
sensor::Sensor * humidity_sensor_
void set_state_save_interval(uint32_t interval)
ESPPreferenceObject bsec_state_
bsec_bme_settings_t bme680_settings_
uint32_t state_save_interval_ms_
static std::vector< BME680BSECComponent * > instances
void set_temperature_sensor(sensor::Sensor *sensor)
sensor::Sensor * gas_resistance_sensor_
void dump_config() override
sensor::Sensor * temperature_sensor_
SampleRate pressure_sample_rate_
void set_breath_voc_equivalent_sensor(sensor::Sensor *sensor)
void set_temperature_sample_rate(SampleRate sample_rate)
bool bsec_state_data_valid_
void update_subscription_()
void set_iaq_sensor(sensor::Sensor *sensor)
static int8_t write_bytes_wrapper(uint8_t devid, uint8_t a_register, uint8_t *data, uint16_t len)
float get_setup_priority() const override
sensor::Sensor * iaq_accuracy_sensor_
Implementation of SPI Controller mode.
static uint8_t work_buffer_[BSEC_MAX_WORKBUFFER_SIZE]
void set_sample_rate(SampleRate sample_rate)
Base-class for all sensors.
void publish_sensor_(sensor::Sensor *sensor, float value, bool change_only=false)
std::queue< std::function< void()> > queue_
sensor::Sensor * iaq_sensor_
void set_humidity_sample_rate(SampleRate sample_rate)
SupplyVoltage supply_voltage_
SampleRate temperature_sample_rate_
This Class provides the methods to read/write bytes from/to an i2c device.
esphome::sensor::Sensor * sensor
void set_iaq_accuracy_sensor(sensor::Sensor *sensor)
void set_iaq_mode(IAQMode iaq_mode)
void set_device_id(const std::string &devid)