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:
		| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user