5#ifdef USE_TMP102_BINARY_SENSOR
9#ifdef USE_TMP102_NUMBER
15#ifdef USE_TMP102_TEXT_SENSOR
29#ifdef USE_TMP102_NUMBER
35class TMP102LimitNumber;
40#ifdef USE_TMP102_BINARY_SENSOR
43#ifdef USE_TMP102_TEXT_SENSOR
44 SUB_TEXT_SENSOR(threshold_status)
46#if defined(USE_TMP102_CONFIGURE) || defined(USE_TMP102_TEXT_SENSOR)
47 void setup()
override;
49#ifdef USE_TMP102_CONFIGURE
56#ifdef USE_TMP102_NUMBER
64#ifdef USE_TMP102_TEXT_SENSOR
73#ifdef USE_TMP102_BINARY_SENSOR
77#ifdef USE_TMP102_BINARY_SENSOR
81#ifdef USE_TMP102_CONFIGURE
88#ifdef USE_TMP102_NUMBER
103#ifdef USE_TMP102_NUMBER
112 friend class testing::TMP102Test;
114 float load_value_(
float fallback,
bool &corrected);
116 void control(
float value)
override;
virtual void setup()
Where the component's initialization should happen.
void status_set_warning()
Helper class to easily give an object a parent of type T.
This class simplifies creating components that periodically check a state.
This Class provides the methods to read/write bytes from/to an i2c device.
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
Base-class for all numbers.
Base-class for all sensors.
bool check_configuration_()
void publish_threshold_status_(uint8_t status)
bool write_register_(uint8_t reg, uint16_t value)
void set_configuration(uint16_t config, uint16_t high_limit, uint16_t low_limit)
void dump_config() override
void publish_threshold_rejection_(bool high, float value, float other)
TMP102LimitNumber * limit_controls_[2]
void set_warning_and_invalidate_alert_()
SUB_BINARY_SENSOR(alert) SUB_TEXT_SENSOR(threshold_status) void setup() override
float get_limit_temperature_(TMP102LimitType limit) const
void publish_threshold_rejection_(bool, float, float)
bool set_limit_temperature_(TMP102LimitType limit, float temperature)
void publish_threshold_status_(uint8_t)
void set_limit_control(TMP102LimitNumber *number)
bool prepare_number_limits_(float *restored, bool *restore_corrected)
void update_configured_()
bool write_configuration_()
void set_restore_value(bool restore_value)
float load_value_(float fallback, bool &corrected)
TMP102LimitType limit_type_
bool save_value_(float value)
ESPPreferenceObject pref_
TMP102LimitNumber(TMP102LimitType limit_type)
void control(float value) override