7 namespace ens160_base {
18 void setup()
override;
46 virtual bool read_byte(uint8_t a_register, uint8_t *data) = 0;
47 virtual bool write_byte(uint8_t a_register, uint8_t data) = 0;
48 virtual bool read_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
49 virtual bool write_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
const float DATA
For components that import data from directly connected sensors like DHT.
void set_tvoc(sensor::Sensor *tvoc)
enum esphome::ens160_base::ENS160Component::ValidityFlag validity_flag_
sensor::Sensor * temperature_
virtual bool write_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
This class simplifies creating components that periodically check a state.
void set_humidity(sensor::Sensor *humidity)
uint8_t firmware_ver_minor_
void set_temperature(sensor::Sensor *temperature)
sensor::Sensor * humidity_
uint8_t firmware_ver_major_
virtual bool read_byte(uint8_t a_register, uint8_t *data)=0
uint8_t firmware_ver_build_
virtual bool read_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
void set_aqi(sensor::Sensor *aqi)
float get_setup_priority() const override
void set_co2(sensor::Sensor *co2)
void dump_config() override
Implementation of SPI Controller mode.
virtual bool write_byte(uint8_t a_register, uint8_t data)=0
enum esphome::ens160_base::ENS160Component::ErrorCode NONE
Base-class for all sensors.