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