13 void setup()
override;
void setup() override
Resets the sensor and ensures that the devices serial number can be read over I2C.
bool reset_()
Sends a 'reset' request to the HTU31D, followed by a 15ms delay.
void set_temperature(sensor::Sensor *temperature)
Dumps the configuration values.
This class simplifies creating components that periodically check a state.
sensor::Sensor * humidity_
float get_setup_priority() const override
Sets the startup priority for this component.
void dump_config() override
Update the sensor values (temperature+humidity).
uint32_t read_serial_num_()
Reads the serial number from the device and checks the CRC.
bool is_heater_enabled()
Checks the diagnostics register to determine if the heater is currently enabled.
Implementation of SPI Controller mode.
void set_heater_state(bool desired)
Sets the heater state on or off.
void update() override
Setup (reset) the sensor and check connection.
void set_humidity(sensor::Sensor *humidity)
Base-class for all sensors.
sensor::Sensor * temperature_
This Class provides the methods to read/write bytes from/to an i2c device.