Move CONF_TEMPERATURE_COMPENSATION to esphome.const

This commit is contained in:
functionpointer 2024-10-19 18:25:44 +02:00
parent 6f16365b2f
commit d0dcf33233
4 changed files with 12 additions and 12 deletions

View file

@ -9,6 +9,7 @@ from esphome.const import (
CONF_OVERSAMPLING, CONF_OVERSAMPLING,
CONF_RESOLUTION, CONF_RESOLUTION,
CONF_TEMPERATURE, CONF_TEMPERATURE,
CONF_TEMPERATURE_COMPENSATION,
ICON_MAGNET, ICON_MAGNET,
ICON_THERMOMETER, ICON_THERMOMETER,
STATE_CLASS_MEASUREMENT, STATE_CLASS_MEASUREMENT,
@ -47,7 +48,6 @@ CONF_X_AXIS = "x_axis"
CONF_Y_AXIS = "y_axis" CONF_Y_AXIS = "y_axis"
CONF_Z_AXIS = "z_axis" CONF_Z_AXIS = "z_axis"
CONF_DRDY_PIN = "drdy_pin" CONF_DRDY_PIN = "drdy_pin"
CONF_TEMPERATURE_COMPENSATION = "temperature_compensation"
CONF_HALLCONF = "hallconf" CONF_HALLCONF = "hallconf"
@ -75,7 +75,7 @@ def mlx90393_axis_schema():
).extend( ).extend(
cv.Schema( cv.Schema(
{ {
cv.Optional(CONF_RESOLUTION, default="DIV_8"): cv.enum( cv.Optional(CONF_RESOLUTION, default="DIV_4"): cv.enum(
RESOLUTION, upper=True, space="_" RESOLUTION, upper=True, space="_"
) )
} }

View file

@ -1,19 +1,19 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import i2c, sensor, sensirion_common
from esphome import automation from esphome import automation
from esphome.automation import maybe_simple_id from esphome.automation import maybe_simple_id
import esphome.codegen as cg
from esphome.components import i2c, sensirion_common, sensor
import esphome.config_validation as cv
from esphome.const import ( from esphome.const import (
CONF_HUMIDITY, CONF_HUMIDITY,
CONF_ID, CONF_ID,
CONF_OFFSET, CONF_OFFSET,
CONF_PM_1_0, CONF_PM_1_0,
CONF_PM_10_0,
CONF_PM_2_5, CONF_PM_2_5,
CONF_PM_4_0, CONF_PM_4_0,
CONF_PM_10_0,
CONF_STORE_BASELINE, CONF_STORE_BASELINE,
CONF_TEMPERATURE, CONF_TEMPERATURE,
CONF_TEMPERATURE_COMPENSATION,
DEVICE_CLASS_AQI, DEVICE_CLASS_AQI,
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_PM1, DEVICE_CLASS_PM1,
@ -51,7 +51,6 @@ CONF_LEARNING_TIME_OFFSET_HOURS = "learning_time_offset_hours"
CONF_NORMALIZED_OFFSET_SLOPE = "normalized_offset_slope" CONF_NORMALIZED_OFFSET_SLOPE = "normalized_offset_slope"
CONF_NOX = "nox" CONF_NOX = "nox"
CONF_STD_INITIAL = "std_initial" CONF_STD_INITIAL = "std_initial"
CONF_TEMPERATURE_COMPENSATION = "temperature_compensation"
CONF_TIME_CONSTANT = "time_constant" CONF_TIME_CONSTANT = "time_constant"
CONF_VOC = "voc" CONF_VOC = "voc"
CONF_VOC_BASELINE = "voc_baseline" CONF_VOC_BASELINE = "voc_baseline"

View file

@ -1,11 +1,12 @@
import esphome.codegen as cg
from esphome import automation from esphome import automation
import esphome.config_validation as cv import esphome.codegen as cg
from esphome.components import i2c, sensor from esphome.components import i2c, sensor
import esphome.config_validation as cv
from esphome.const import ( from esphome.const import (
CONF_ID,
CONF_EC, CONF_EC,
CONF_ID,
CONF_TEMPERATURE, CONF_TEMPERATURE,
CONF_TEMPERATURE_COMPENSATION,
DEVICE_CLASS_EMPTY, DEVICE_CLASS_EMPTY,
DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_TEMPERATURE,
ICON_EMPTY, ICON_EMPTY,
@ -18,7 +19,6 @@ DEPENDENCIES = ["i2c"]
CONF_SOLUTION = "solution" CONF_SOLUTION = "solution"
CONF_TEMPERATURE_SENSOR = "temperature_sensor" CONF_TEMPERATURE_SENSOR = "temperature_sensor"
CONF_TEMPERATURE_COMPENSATION = "temperature_compensation"
CONF_TEMPERATURE_COEFFICIENT = "temperature_coefficient" CONF_TEMPERATURE_COEFFICIENT = "temperature_coefficient"
ufire_ec_ns = cg.esphome_ns.namespace("ufire_ec") ufire_ec_ns = cg.esphome_ns.namespace("ufire_ec")

View file

@ -858,6 +858,7 @@ CONF_TARGET_TEMPERATURE_LOW_COMMAND_TOPIC = "target_temperature_low_command_topi
CONF_TARGET_TEMPERATURE_LOW_STATE_TOPIC = "target_temperature_low_state_topic" CONF_TARGET_TEMPERATURE_LOW_STATE_TOPIC = "target_temperature_low_state_topic"
CONF_TARGET_TEMPERATURE_STATE_TOPIC = "target_temperature_state_topic" CONF_TARGET_TEMPERATURE_STATE_TOPIC = "target_temperature_state_topic"
CONF_TEMPERATURE = "temperature" CONF_TEMPERATURE = "temperature"
CONF_TEMPERATURE_COMPENSATION = "temperature_compensation"
CONF_TEMPERATURE_OFFSET = "temperature_offset" CONF_TEMPERATURE_OFFSET = "temperature_offset"
CONF_TEMPERATURE_SOURCE = "temperature_source" CONF_TEMPERATURE_SOURCE = "temperature_source"
CONF_TEMPERATURE_STEP = "temperature_step" CONF_TEMPERATURE_STEP = "temperature_step"