From c8d0cde329a83dd042412651c033dd133c9a3330 Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:49:12 +1100 Subject: [PATCH] [config] Ensure user-supplied build flags don't get silently overwritten (#7622) --- esphome/core/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/core/config.py b/esphome/core/config.py index f4253bee87..8c130eb6db 100644 --- a/esphome/core/config.py +++ b/esphome/core/config.py @@ -318,6 +318,8 @@ async def add_includes(includes): async def _add_platformio_options(pio_options): # Add includes at the very end, so that they override everything for key, val in pio_options.items(): + if key == "build_flags" and not isinstance(val, list): + val = [val] cg.add_platformio_option(key, val)