29 void setup()
override;
90 uint8_t number_of_adjustments{0};
162 this->on_ps_high_trigger_callback_.add(std::move(callback));
166 this->on_ps_low_trigger_callback_.add(std::move(callback));
void apply_lux_calculation_(AlsReadings &data)
bool is_any_ps_sensor_enabled_() const
void set_actual_integration_time_sensor(sensor::Sensor *sensor)
bool is_any_als_sensor_enabled_() const
void set_ltr_type(LtrType type)
const float DATA
For components that import data from directly connected sensors like DHT.
bool are_adjustments_required_(AlsReadings &data)
void publish_data_part_2_(AlsReadings &data)
void set_als_auto_mode(bool enable)
sensor::Sensor * infrared_counts_sensor_
uint16_t ps_threshold_high_
float get_setup_priority() const override
void set_als_meas_repeat_rate(MeasurementRepeatRate rate)
void set_als_gain(AlsGain501 gain)
void add_on_ps_low_trigger_callback_(std::function< void()> callback)
void set_ambient_light_sensor(sensor::Sensor *sensor)
sensor::Sensor * ambient_light_sensor_
void set_als_integration_time(IntegrationTime501 time)
struct esphome::ltr501::LTRAlsPs501Component::AlsReadings als_readings_
void read_sensor_data_(AlsReadings &data)
This class simplifies creating components that periodically check a state.
IntegrationTime501 integration_time_
CallbackManager< void()> on_ps_low_trigger_callback_
sensor::Sensor * actual_integration_time_sensor_
void set_ps_low_threshold(uint16_t threshold)
void set_actual_gain_sensor(sensor::Sensor *sensor)
void dump_config() override
void set_ps_high_threshold(uint16_t threshold)
void set_ps_gain(PsGain501 gain)
bool check_part_number_()
DataAvail is_als_data_ready_(AlsReadings &data)
void set_infrared_counts_sensor(sensor::Sensor *sensor)
LTRPsLowTrigger(LTRAlsPs501Component *parent)
bool automatic_mode_enabled_
sensor::Sensor * proximity_counts_sensor_
void set_proximity_counts_sensor(sensor::Sensor *sensor)
void set_ps_cooldown_time_s(uint16_t time)
IntegrationTime501 integration_time
void configure_integration_time_(IntegrationTime501 time)
void publish_data_part_1_(AlsReadings &data)
MeasurementRepeatRate repeat_rate_
sensor::Sensor * full_spectrum_counts_sensor_
void set_als_glass_attenuation_factor(float factor)
LTRPsHighTrigger(LTRAlsPs501Component *parent)
CallbackManager< void()> on_ps_high_trigger_callback_
uint16_t ps_cooldown_time_s_
void add_on_ps_high_trigger_callback_(std::function< void()> callback)
Implementation of SPI Controller mode.
sensor::Sensor * actual_gain_sensor_
uint16_t ps_threshold_low_
Base-class for all sensors.
float glass_attenuation_factor_
void set_full_spectrum_counts_sensor(sensor::Sensor *sensor)
void check_and_trigger_ps_()
This Class provides the methods to read/write bytes from/to an i2c device.
esphome::sensor::Sensor * sensor
void configure_gain_(AlsGain501 gain)