[const] Move aqi to the shared constants (#20494)

This commit is contained in:
J. Nick Koston
2026-10-10 09:43:57 -10:00
committed by GitHub
parent ff96530e4d
commit ebbe3860ec
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,5 @@
import esphome.codegen as cg
from esphome.components.const import CONF_AQI # noqa: F401
CODEOWNERS = ["@jasstrong", "@ximex", "@freekode"]
DOMAIN = "aqi"
@@ -6,7 +7,6 @@ DOMAIN = "aqi"
aqi_ns = cg.esphome_ns.namespace("aqi")
AQICalculatorType = aqi_ns.enum("AQICalculatorType")
CONF_AQI = "aqi"
CONF_CALCULATION_TYPE = "calculation_type"
CONF_EXTENDED_RANGE = "extended_range"
+1
View File
@@ -9,6 +9,7 @@ BYTE_ORDER_BIG = "big_endian"
CONF_ACCELEROMETER_ODR = "accelerometer_odr"
CONF_ACCELEROMETER_RANGE = "accelerometer_range"
CONF_ALLOWED_IPS = "allowed_ips"
CONF_AQI = "aqi"
CONF_AUTOMATIC_BASELINE_CALIBRATION = "automatic_baseline_calibration"
CONF_B_CONSTANT = "b_constant"
CONF_BREATH_VOC_EQUIVALENT = "breath_voc_equivalent"
+1 -1
View File
@@ -1,5 +1,6 @@
import esphome.codegen as cg
from esphome.components import sensor
from esphome.components.const import CONF_AQI
import esphome.config_validation as cv
from esphome.const import (
CONF_COMPENSATION,
@@ -26,7 +27,6 @@ DOMAIN = "ens160_base"
ens160_ns = cg.esphome_ns.namespace("ens160_base")
CONF_AQI = "aqi"
CONFIG_SCHEMA_BASE = cv.Schema(
{
+2 -1
View File
@@ -2,7 +2,8 @@ import logging
import esphome.codegen as cg
from esphome.components import i2c, sensor
from esphome.components.aqi import AQI_CALCULATION_TYPE, CONF_AQI, CONF_CALCULATION_TYPE
from esphome.components.aqi import AQI_CALCULATION_TYPE, CONF_CALCULATION_TYPE
from esphome.components.const import CONF_AQI
import esphome.config_validation as cv
from esphome.const import (
CONF_ID,