Skip to content

Commit

Permalink
Use roundf instead of round
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
  • Loading branch information
kswt and jesserockz committed Jul 10, 2023
1 parent 7df3c6b commit b8e337c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/components/tuya/light/tuya_light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void TuyaLight::write_state(light::LightState *state) {

if (brightness > 0.0f || !color_interlock_) {
if (this->color_temperature_id_.has_value()) {
uint32_t color_temp_int = static_cast<uint32_t>(round(color_temperature * this->color_temperature_max_value_));
uint32_t color_temp_int = static_cast<uint32_t>(roundf(color_temperature * this->color_temperature_max_value_));
if (this->color_temperature_invert_) {
color_temp_int = this->color_temperature_max_value_ - color_temp_int;
}
Expand Down

0 comments on commit b8e337c

Please sign in to comment.