[core] Share conversion rate configuration constant (#19800)

This commit is contained in:
techdregs
2026-09-28 02:24:42 +02:00
committed by GitHub
parent 2e927c98ca
commit dd777bcecf
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ CONF_CLIMATE_ID = "climate_id"
CONF_CO2_EQUIVALENT = "co2_equivalent"
CONF_COLOR_DEPTH = "color_depth"
CONF_COLUMNS = "columns"
CONF_CONVERSION_RATE = "conversion_rate"
CONF_CRC_ENABLE = "crc_enable"
CONF_DATA_BITS = "data_bits"
CONF_DESCRIPTION = "description"
+1 -1
View File
@@ -1,5 +1,6 @@
import esphome.codegen as cg
from esphome.components import i2c
from esphome.components.const import CONF_CONVERSION_RATE
import esphome.config_validation as cv
from esphome.const import CONF_ID, CONF_INVERTED, CONF_RESOLUTION
from esphome.types import ConfigType
@@ -13,7 +14,6 @@ MULTI_CONF = True
CONF_PWM = "pwm"
CONF_DIVIDER = "divider"
CONF_DAC = "dac"
CONF_CONVERSION_RATE = "conversion_rate"
CONF_EMC2101_ID = "emc2101_id"
+1 -1
View File
@@ -1,5 +1,6 @@
import esphome.codegen as cg
from esphome.components import i2c, sensor
from esphome.components.const import CONF_CONVERSION_RATE
import esphome.config_validation as cv
from esphome.const import (
DEVICE_CLASS_TEMPERATURE,
@@ -41,7 +42,6 @@ CONF_LIMIT_LOW = "limit_low"
CONF_LIMIT_HIGH = "limit_high"
CONF_FAULT_COUNT = "fault_count"
CONF_POLARITY = "polarity"
CONF_CONVERSION_RATE = "conversion_rate"
CONF_FUNCTION = "function"
CONFIG_SCHEMA = (