1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

improve const imports of esphome.const (#10438)

This commit is contained in:
Thomas Rupprecht
2025-08-25 23:45:03 +02:00
committed by GitHub
parent f6ca70970f
commit c01a26607e
2 changed files with 10 additions and 3 deletions

View File

@@ -5,9 +5,14 @@ from esphome import automation
import esphome.codegen as cg import esphome.codegen as cg
from esphome.components.esp32 import add_idf_sdkconfig_option, const, get_esp32_variant from esphome.components.esp32 import add_idf_sdkconfig_option, const, get_esp32_variant
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome.const import CONF_ENABLE_ON_BOOT, CONF_ESPHOME, CONF_ID, CONF_NAME from esphome.const import (
CONF_ENABLE_ON_BOOT,
CONF_ESPHOME,
CONF_ID,
CONF_NAME,
CONF_NAME_ADD_MAC_SUFFIX,
)
from esphome.core import CORE, TimePeriod from esphome.core import CORE, TimePeriod
from esphome.core.config import CONF_NAME_ADD_MAC_SUFFIX
import esphome.final_validate as fv import esphome.final_validate as fv
DEPENDENCIES = ["esp32"] DEPENDENCIES = ["esp32"]

View File

@@ -1,6 +1,5 @@
import esphome.codegen as cg import esphome.codegen as cg
from esphome.components import modbus, sensor from esphome.components import modbus, sensor
from esphome.components.atm90e32.sensor import CONF_PHASE_A, CONF_PHASE_B, CONF_PHASE_C
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome.const import ( from esphome.const import (
CONF_ACTIVE_POWER, CONF_ACTIVE_POWER,
@@ -12,7 +11,10 @@ from esphome.const import (
CONF_ID, CONF_ID,
CONF_IMPORT_ACTIVE_ENERGY, CONF_IMPORT_ACTIVE_ENERGY,
CONF_IMPORT_REACTIVE_ENERGY, CONF_IMPORT_REACTIVE_ENERGY,
CONF_PHASE_A,
CONF_PHASE_ANGLE, CONF_PHASE_ANGLE,
CONF_PHASE_B,
CONF_PHASE_C,
CONF_POWER_FACTOR, CONF_POWER_FACTOR,
CONF_REACTIVE_POWER, CONF_REACTIVE_POWER,
CONF_TOTAL_POWER, CONF_TOTAL_POWER,