mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 13:40:59 +00:00
[display] Properly handle case of auto_clear_enabled: false (#8156)
This commit is contained in:
parent
9957840dfc
commit
619ce93dec
@ -101,7 +101,7 @@ async def setup_display_core_(var, config):
|
|||||||
if CONF_ROTATION in config:
|
if CONF_ROTATION in config:
|
||||||
cg.add(var.set_rotation(DISPLAY_ROTATIONS[config[CONF_ROTATION]]))
|
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
|
# 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.
|
# the possible schemas are too complex to do this easily.
|
||||||
if auto_clear == CONF_UNSPECIFIED:
|
if auto_clear == CONF_UNSPECIFIED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user