From 854f0523023133aa5e9c760dd64c2e39c8229c55 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 23 Aug 2026 10:11:30 -0500 Subject: [PATCH] Key light_json_schema.cpp on mqtt or web_server instead of json --- esphome/components/light/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/light/__init__.py b/esphome/components/light/__init__.py index 8ba5f93985..dbcc28d64a 100644 --- a/esphome/components/light/__init__.py +++ b/esphome/components/light/__init__.py @@ -560,8 +560,8 @@ async def to_code(config): cg.add_global(light_ns.using) -# light_json_schema.cpp is fully #ifdef'd on USE_JSON; only mqtt and -# web_server use it. +# light_json_schema.cpp is only used by mqtt and web_server, which both +# auto load json; USE_JSON alone is too broad since other components load it. FILTER_SOURCE_FILES = filter_source_files_from_defines( - {"light_json_schema.cpp": "USE_JSON"} + {"light_json_schema.cpp": ("USE_MQTT", "USE_WEBSERVER")} )