247 void setup()
override;
void dump_config() override
Used by ESPHome framework.
sensor::Sensor * visible_sensor_
bool power_save_mode_enabled_
void set_full_spectrum_sensor(sensor::Sensor *full_spectrum_sensor)
Used by ESPHome framework.
sensor::Sensor * calculated_lux_sensor_
uint64_t interval_timeout_
uint16_t get_illuminance(TSL2591SensorChannel channel)
Get an individual sensor channel reading.
void disable_if_power_saving_()
void set_name(const char *name)
Sets the name for this instance of the device.
float get_actual_gain()
Reads the actual gain used.
void set_actual_gain_sensor(sensor::Sensor *actual_gain_sensor)
Used by ESPHome framework.
void set_calculated_lux_sensor(sensor::Sensor *calculated_lux_sensor)
Used by ESPHome framework.
TSL2591IntegrationTime
Enum listing all conversion/integration time settings for the TSL2591.
This class simplifies creating components that periodically check a state.
This class includes support for the TSL2591 i2c ambient light sensor.
sensor::Sensor * infrared_sensor_
void update() override
Used by ESPHome framework.
TSL2591ComponentGain component_gain_
void set_power_save_mode(bool enable)
Should the device be powered down between readings?
sensor::Sensor * actual_gain_sensor_
void set_integration_time_and_gain(TSL2591IntegrationTime integration_time, TSL2591Gain gain)
Set device integration time and gain.
void set_integration_time(TSL2591IntegrationTime integration_time)
Used by ESPHome framework.
void setup() override
Used by ESPHome framework.
void set_infrared_sensor(sensor::Sensor *infrared_sensor)
Used by ESPHome framework.
sensor::Sensor * full_spectrum_sensor_
IntegrationTime501 integration_time
TSL2591ComponentGain
Enum listing all gain settings for the TSL2591 component.
void enable()
Powers on the TSL2591 device and enables its sensors.
TSL2591Gain
Enum listing all gain settings for the TSL2591.
TSL2591IntegrationTime integration_time_
TSL2591SensorChannel
Enum listing sensor channels.
void set_gain(TSL2591ComponentGain gain)
Used by ESPHome framework.
float glass_attenuation_factor_
void disable()
Powers off the TSL2591 device.
Implementation of SPI Controller mode.
bool is_adc_valid()
Are the device ADC values valid?
float get_setup_priority() const override
Used by ESPHome framework.
Base-class for all sensors.
void automatic_gain_update(uint16_t full_spectrum)
Updates the gain setting based on the most recent full spectrum reading.
void set_visible_sensor(sensor::Sensor *visible_sensor)
Used by ESPHome framework.
void interval_function_for_update_()
This Class provides the methods to read/write bytes from/to an i2c device.
void set_device_and_glass_attenuation_factors(float device_factor, float glass_attenuation_factor)
Sets the device and glass attenuation factors.
float get_calculated_lux(uint16_t full_spectrum, uint16_t infrared)
Calculates and returns a lux value based on the ADC readings.
uint32_t get_combined_illuminance()
Get the combined illuminance value.