[apc1][systa_bus] Move CONF_ERROR_CODE to the shared component constants (#21230)

This commit is contained in:
epicRE
2026-10-20 11:16:19 -10:00
committed by GitHub
parent 6bb51c8cd9
commit 876537186c
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -2,7 +2,7 @@ from esphome import automation, pins
from esphome.automation import maybe_simple_id
import esphome.codegen as cg
from esphome.components import sensor, uart
from esphome.components.const import CONF_AQI
from esphome.components.const import CONF_AQI, CONF_ERROR_CODE
import esphome.config_validation as cv
from esphome.const import (
CONF_ECO2,
@@ -55,7 +55,6 @@ CONF_RAW_HUMIDITY = "raw_humidity"
CONF_RS0 = "rs0"
CONF_RS2 = "rs2"
CONF_RS3 = "rs3"
CONF_ERROR_CODE = "error_code"
apc1_ns = cg.esphome_ns.namespace("apc1")
APC1Component = apc1_ns.class_("APC1Component", uart.UARTDevice, cg.Component)
+1
View File
@@ -33,6 +33,7 @@ CONF_DRAW_ROUNDING = "draw_rounding"
CONF_DRIVE_STRENGTH = "drive_strength"
CONF_ENABLE_OTA_DOWNGRADE_PROTECTION = "enable_ota_downgrade_protection"
CONF_ENABLED = "enabled"
CONF_ERROR_CODE = "error_code"
CONF_GREEN_CHANNEL = "green_channel"
CONF_GYROSCOPE_ODR = "gyroscope_odr"
CONF_GYROSCOPE_RANGE = "gyroscope_range"
@@ -1,5 +1,6 @@
import esphome.codegen as cg
from esphome.components import text_sensor
from esphome.components.const import CONF_ERROR_CODE
import esphome.config_validation as cv
from esphome.const import CONF_ID, CONF_MODEL
from esphome.types import ConfigType
@@ -14,8 +15,6 @@ from .. import (
SystaSolarAquaTextSensor = systa_bus_ns.class_("SystaSolarAquaTextSensor", cg.Component)
CONF_ERROR_CODE = "error_code"
CONFIG_SCHEMA = cv.typed_schema(
{