From 9ded501402ce39e4fed2ed88c8a0193b6b27502d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 5 Jul 2025 14:50:17 -0500 Subject: [PATCH] clang-tidy --- esphome/components/light/light_call.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/light/light_call.cpp b/esphome/components/light/light_call.cpp index beefb73e90..a3ffe22591 100644 --- a/esphome/components/light/light_call.cpp +++ b/esphome/components/light/light_call.cpp @@ -11,11 +11,11 @@ static const char *const TAG = "light"; // Macro to reduce repetitive setter code #define IMPLEMENT_LIGHT_CALL_SETTER(name, type, flag) \ - LightCall &LightCall::set_##name(optional name) { \ - if (name.has_value()) { \ - this->name##_ = name.value(); \ + LightCall &LightCall::set_##name(optional(name)) { \ + if ((name).has_value()) { \ + this->name##_ = (name).value(); \ } \ - this->set_flag_(flag, name.has_value()); \ + this->set_flag_(flag, (name).has_value()); \ return *this; \ } \ LightCall &LightCall::set_##name(type name) { \