From 053cb337aa38509f80f22da42a0ea11849c8fa0c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 2 Oct 2026 21:42:31 -0500 Subject: [PATCH] Split the field type guards into one static_assert per field clang-tidy flags the chained is_same_v checks as a redundant expression. --- esphome/components/binary_sensor/filter.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/esphome/components/binary_sensor/filter.h b/esphome/components/binary_sensor/filter.h index 34788323fac..1cfb142e42b 100644 --- a/esphome/components/binary_sensor/filter.h +++ b/esphome/components/binary_sensor/filter.h @@ -88,9 +88,11 @@ struct AutorepeatFilterTiming { uint32_t time_on; }; // Read straight from flash on ESP8266, so every field must stay a word. -static_assert(std::is_same_v && - std::is_same_v && - std::is_same_v, +static_assert(std::is_same_v, + "AutorepeatFilterTiming fields must stay uint32_t"); +static_assert(std::is_same_v, + "AutorepeatFilterTiming fields must stay uint32_t"); +static_assert(std::is_same_v, "AutorepeatFilterTiming fields must stay uint32_t"); /// Timings live in a PROGMEM table emitted by codegen, ended by an entry whose delay is