mirror of
https://github.com/esphome/esphome.git
synced 2026-08-24 07:06:20 +00:00
[light] Skip light_json_schema.cpp when json is not used
This commit is contained in:
@@ -7,6 +7,7 @@ import esphome.automation as auto
|
||||
import esphome.codegen as cg
|
||||
from esphome.components import mqtt, power_supply, web_server
|
||||
from esphome.components.const import CONF_CHANNEL_COLORS, CONF_IS_WRGB
|
||||
from esphome.config_helpers import filter_source_files_from_defines
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_BLUE,
|
||||
@@ -557,3 +558,10 @@ async def new_light(config, *args):
|
||||
@coroutine_with_priority(CoroPriority.CORE)
|
||||
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.
|
||||
FILTER_SOURCE_FILES = filter_source_files_from_defines(
|
||||
{"light_json_schema.cpp": "USE_JSON"}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user