Move CONF_INTERRUPT_PIN to const.py (#4014)

This commit is contained in:
Jesse Hills 2022-11-10 22:49:04 +13:00 committed by GitHub
parent 2c2e68123a
commit 27a339fa12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 10 deletions

View file

@ -3,7 +3,7 @@ import esphome.config_validation as cv
from esphome import pins
from esphome.components import i2c, touchscreen
from esphome.const import CONF_ID
from esphome.const import CONF_ID, CONF_INTERRUPT_PIN
CODEOWNERS = ["@jesserockz"]
DEPENDENCIES = ["i2c"]
@ -17,10 +17,8 @@ EKTF2232Touchscreen = ektf2232_ns.class_(
)
CONF_EKTF2232_ID = "ektf2232_id"
CONF_INTERRUPT_PIN = "interrupt_pin"
CONF_RTS_PIN = "rts_pin"
CONFIG_SCHEMA = touchscreen.TOUCHSCREEN_SCHEMA.extend(
cv.Schema(
{

View file

@ -3,7 +3,7 @@ import esphome.config_validation as cv
from esphome import pins
from esphome.components import i2c, touchscreen
from esphome.const import CONF_ID
from esphome.const import CONF_ID, CONF_INTERRUPT_PIN
from .. import lilygo_t5_47_ns
@ -18,8 +18,6 @@ LilygoT547Touchscreen = lilygo_t5_47_ns.class_(
)
CONF_LILYGO_T5_47_TOUCHSCREEN_ID = "lilygo_t5_47_touchscreen_id"
CONF_INTERRUPT_PIN = "interrupt_pin"
CONFIG_SCHEMA = touchscreen.TOUCHSCREEN_SCHEMA.extend(
cv.Schema(

View file

@ -3,18 +3,19 @@ import esphome.config_validation as cv
from esphome import pins
from esphome.components import spi, touchscreen
from esphome.const import CONF_ID, CONF_THRESHOLD
from esphome.const import CONF_ID, CONF_THRESHOLD, CONF_INTERRUPT_PIN
CODEOWNERS = ["@numo68", "@nielsnl68"]
DEPENDENCIES = ["spi"]
XPT2046_ns = cg.esphome_ns.namespace("xpt2046")
XPT2046Component = XPT2046_ns.class_(
"XPT2046Component", touchscreen.Touchscreen, cg.PollingComponent, spi.SPIDevice
"XPT2046Component",
touchscreen.Touchscreen,
cg.PollingComponent,
spi.SPIDevice,
)
CONF_INTERRUPT_PIN = "interrupt_pin"
CONF_REPORT_INTERVAL = "report_interval"
CONF_CALIBRATION_X_MIN = "calibration_x_min"
CONF_CALIBRATION_X_MAX = "calibration_x_max"

View file

@ -322,6 +322,7 @@ CONF_INTERNAL = "internal"
CONF_INTERNAL_FILTER = "internal_filter"
CONF_INTERNAL_FILTER_MODE = "internal_filter_mode"
CONF_INTERRUPT = "interrupt"
CONF_INTERRUPT_PIN = "interrupt_pin"
CONF_INTERVAL = "interval"
CONF_INVALID_COOLDOWN = "invalid_cooldown"
CONF_INVERT = "invert"