Move CONF_IRQ_PIN into const.py (#5488)

This commit is contained in:
Keith Burzinski 2023-10-06 00:28:51 -05:00 committed by GitHub
parent b6d5cb4142
commit 44e5b0c745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -4,13 +4,14 @@ from esphome.components import sensor, i2c
from esphome import pins
from esphome.const import (
CONF_ID,
CONF_IRQ_PIN,
CONF_VOLTAGE,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_POWER,
DEVICE_CLASS_VOLTAGE,
STATE_CLASS_MEASUREMENT,
UNIT_VOLT,
UNIT_AMPERE,
UNIT_VOLT,
UNIT_WATT,
)
@ -19,7 +20,6 @@ DEPENDENCIES = ["i2c"]
ade7953_ns = cg.esphome_ns.namespace("ade7953")
ADE7953 = ade7953_ns.class_("ADE7953", cg.PollingComponent, i2c.I2CDevice)
CONF_IRQ_PIN = "irq_pin"
CONF_CURRENT_A = "current_a"
CONF_CURRENT_B = "current_b"
CONF_ACTIVE_POWER_A = "active_power_a"

View File

@ -2,14 +2,15 @@ import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
from esphome.const import (
CONF_CAPACITANCE,
CONF_DIV_RATIO,
CONF_INDOOR,
CONF_WATCHDOG_THRESHOLD,
CONF_NOISE_LEVEL,
CONF_SPIKE_REJECTION,
CONF_IRQ_PIN,
CONF_LIGHTNING_THRESHOLD,
CONF_MASK_DISTURBER,
CONF_DIV_RATIO,
CONF_CAPACITANCE,
CONF_NOISE_LEVEL,
CONF_SPIKE_REJECTION,
CONF_WATCHDOG_THRESHOLD,
)
MULTI_CONF = True
@ -19,7 +20,6 @@ CONF_AS3935_ID = "as3935_id"
as3935_ns = cg.esphome_ns.namespace("as3935")
AS3935 = as3935_ns.class_("AS3935Component", cg.Component)
CONF_IRQ_PIN = "irq_pin"
AS3935_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(AS3935),

View File

@ -3,7 +3,7 @@ import esphome.config_validation as cv
from esphome import pins
from esphome.components import spi, touchscreen
from esphome.const import CONF_ID, CONF_THRESHOLD, CONF_INTERRUPT_PIN
from esphome.const import CONF_ID, CONF_INTERRUPT_PIN, CONF_IRQ_PIN, CONF_THRESHOLD
CODEOWNERS = ["@numo68", "@nielsnl68"]
DEPENDENCIES = ["spi"]
@ -26,7 +26,6 @@ CONF_SWAP_X_Y = "swap_x_y"
# obsolete Keys
CONF_DIMENSION_X = "dimension_x"
CONF_DIMENSION_Y = "dimension_y"
CONF_IRQ_PIN = "irq_pin"
def validate_xpt2046(config):

View File

@ -360,6 +360,7 @@ CONF_INVALID_COOLDOWN = "invalid_cooldown"
CONF_INVERT = "invert"
CONF_INVERTED = "inverted"
CONF_IP_ADDRESS = "ip_address"
CONF_IRQ_PIN = "irq_pin"
CONF_JS_INCLUDE = "js_include"
CONF_JS_URL = "js_url"
CONF_JVC = "jvc"