Add constants used by multiple display drivers to global const.py (#6033)

* Add constants used by multiple display drivers to global const.py

* Add further constants

* Refactor st7789v and st7735v
This commit is contained in:
Clyde Stubbs
2023-12-29 13:00:19 +11:00
committed by GitHub
parent d4d49e38fc
commit 21ec42f495
6 changed files with 31 additions and 21 deletions
+1 -1
View File
@@ -10,6 +10,7 @@ from esphome.const import (
CONF_MODEL,
CONF_RESET_PIN,
CONF_PAGES,
CONF_INVERT_COLORS,
)
from . import st7735_ns
@@ -23,7 +24,6 @@ CONF_ROW_START = "row_start"
CONF_COL_START = "col_start"
CONF_EIGHT_BIT_COLOR = "eight_bit_color"
CONF_USE_BGR = "use_bgr"
CONF_INVERT_COLORS = "invert_colors"
SPIST7735 = st7735_ns.class_(
"ST7735", cg.PollingComponent, display.DisplayBuffer, spi.SPIDevice