From 9c3817f544e7818038d81d1cc65afc7b79fcc700 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 26 Jan 2026 17:21:17 -1000 Subject: [PATCH] [sml] Use constexpr std::array for START_SEQ constant (#13506) --- esphome/components/sml/constants.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/sml/constants.h b/esphome/components/sml/constants.h index d6761d4bb7c..0142fe98f75 100644 --- a/esphome/components/sml/constants.h +++ b/esphome/components/sml/constants.h @@ -1,5 +1,6 @@ #pragma once +#include #include namespace esphome { @@ -21,7 +22,7 @@ enum SmlMessageType : uint16_t { SML_PUBLIC_OPEN_RES = 0x0101, SML_GET_LIST_RES const uint16_t START_MASK = 0x55aa; // 0x1b 1b 1b 1b 01 01 01 01 const uint16_t END_MASK = 0x0157; // 0x1b 1b 1b 1b 1a -const std::vector START_SEQ = {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01}; +constexpr std::array START_SEQ = {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01}; } // namespace sml } // namespace esphome