1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 20:53:50 +00:00

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

View File

@@ -3,7 +3,14 @@ import esphome.codegen as cg
from esphome.components import display
from esphome import automation
from esphome.const import CONF_ON_TOUCH, CONF_ON_RELEASE
from esphome.const import (
CONF_ON_TOUCH,
CONF_ON_RELEASE,
CONF_MIRROR_X,
CONF_MIRROR_Y,
CONF_SWAP_XY,
CONF_TRANSFORM,
)
from esphome.core import coroutine_with_priority
CODEOWNERS = ["@jesserockz", "@nielsnl68"]
@@ -26,11 +33,6 @@ CONF_REPORT_INTERVAL = "report_interval" # not used yet:
CONF_ON_UPDATE = "on_update"
CONF_TOUCH_TIMEOUT = "touch_timeout"
CONF_MIRROR_X = "mirror_x"
CONF_MIRROR_Y = "mirror_y"
CONF_SWAP_XY = "swap_xy"
CONF_TRANSFORM = "transform"
def touchscreen_schema(default_touch_timeout):
return cv.Schema(