From adb7ccdbc7b4645447144db41c9aa21dfddb6bf5 Mon Sep 17 00:00:00 2001 From: Big Mike Date: Thu, 3 Jul 2025 20:00:50 -0500 Subject: [PATCH] Fix compiler warning in tsl2591 component (#9310) --- esphome/components/tsl2591/tsl2591.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/tsl2591/tsl2591.cpp b/esphome/components/tsl2591/tsl2591.cpp index 1734d83dd2..c7622b116a 100644 --- a/esphome/components/tsl2591/tsl2591.cpp +++ b/esphome/components/tsl2591/tsl2591.cpp @@ -232,7 +232,7 @@ void TSL2591Component::set_integration_time_and_gain(TSL2591IntegrationTime inte this->integration_time_ = integration_time; this->gain_ = gain; if (!this->write_byte(TSL2591_COMMAND_BIT | TSL2591_REGISTER_CONTROL, - this->integration_time_ | this->gain_)) { // NOLINT + static_cast(this->integration_time_) | static_cast(this->gain_))) { ESP_LOGE(TAG, "I2C write failed"); } // The ADC values can be confused if gain or integration time are changed in the middle of a cycle.