1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

[hub75] Fix gamma_correct to use enum value instead of key string (#13102)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Stuart Parmenter
2026-01-09 11:34:04 -08:00
committed by GitHub
parent 3d54ccac65
commit ab32b93928
3 changed files with 3 additions and 1 deletions

View File

@@ -555,7 +555,7 @@ async def to_code(config: ConfigType) -> None:
cg.add_build_flag(f"-DHUB75_BIT_DEPTH={config[CONF_BIT_DEPTH]}")
if CONF_GAMMA_CORRECT in config:
cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT]}")
cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT].enum_value}")
# Await all pin expressions
pin_expressions = {

View File

@@ -6,6 +6,7 @@ display:
panel_height: 32
double_buffer: true
brightness: 128
gamma_correct: gamma_2_2
pages:
- id: page1
lambda: |-

View File

@@ -5,6 +5,7 @@ display:
panel_height: 32
double_buffer: true
brightness: 128
gamma_correct: cie1931
r1_pin: GPIO42
g1_pin: GPIO41
b1_pin: GPIO40