From 7576e032f8ef79375f82d24a9d105f98a78206cd Mon Sep 17 00:00:00 2001 From: Stuart Parmenter Date: Thu, 8 Jan 2026 23:56:51 -0800 Subject: [PATCH] [hub75] Fix depth and gamma mode defines (#13091) --- esphome/components/hub75/display.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/hub75/display.py b/esphome/components/hub75/display.py index 40202e52ca..7a3df333c9 100644 --- a/esphome/components/hub75/display.py +++ b/esphome/components/hub75/display.py @@ -550,12 +550,12 @@ async def to_code(config: ConfigType) -> None: ref="0.2.2", ) - # Set compile-time configuration via defines + # Set compile-time configuration via build flags (so external library sees them) if CONF_BIT_DEPTH in config: - cg.add_define("HUB75_BIT_DEPTH", config[CONF_BIT_DEPTH]) + cg.add_build_flag(f"-DHUB75_BIT_DEPTH={config[CONF_BIT_DEPTH]}") if CONF_GAMMA_CORRECT in config: - cg.add_define("HUB75_GAMMA_MODE", config[CONF_GAMMA_CORRECT]) + cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT]}") # Await all pin expressions pin_expressions = {