1
0
mirror of https://github.com/esphome/esphome.git synced 2025-01-31 02:00:55 +00:00

[display] Properly handle case of auto_clear_enabled: false (#8156)

This commit is contained in:
Clyde Stubbs 2025-01-29 21:45:29 +11:00 committed by GitHub
parent 9957840dfc
commit 619ce93dec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,7 +101,7 @@ async def setup_display_core_(var, config):
if CONF_ROTATION in config:
cg.add(var.set_rotation(DISPLAY_ROTATIONS[config[CONF_ROTATION]]))
if auto_clear := config.get(CONF_AUTO_CLEAR_ENABLED):
if (auto_clear := config.get(CONF_AUTO_CLEAR_ENABLED)) is not None:
# Default to true if pages or lambda is specified. Ideally this would be done during validation, but
# the possible schemas are too complex to do this easily.
if auto_clear == CONF_UNSPECIFIED: