diff --git a/esphome/components/combination/sensor.py b/esphome/components/combination/sensor.py index 608ebac4d6a..a61d88e126e 100644 --- a/esphome/components/combination/sensor.py +++ b/esphome/components/combination/sensor.py @@ -1,5 +1,6 @@ import esphome.codegen as cg from esphome.components import sensor +from esphome.components.const import CONF_SOURCES import esphome.config_validation as cv from esphome.const import ( CONF_ACCURACY_DECIMALS, @@ -59,7 +60,6 @@ CONF_MEDIAN = "median" CONF_MIN = "min" CONF_MOST_RECENTLY_UPDATED = "most_recently_updated" CONF_PROCESS_STD_DEV = "process_std_dev" -CONF_SOURCES = "sources" CONF_STD_DEV = "std_dev" diff --git a/esphome/components/const/__init__.py b/esphome/components/const/__init__.py index a15df707e60..06e8d80103f 100644 --- a/esphome/components/const/__init__.py +++ b/esphome/components/const/__init__.py @@ -69,6 +69,7 @@ CONF_SCAN_PARAMETERS = "scan_parameters" CONF_SERIAL_NUMBER = "serial_number" CONF_SHA256 = "sha256" CONF_SLOT = "slot" +CONF_SOURCES = "sources" CONF_STATE_SAVE_INTERVAL = "state_save_interval" CONF_STOP_BITS = "stop_bits" CONF_TARGET_COUNT = "target_count" diff --git a/esphome/components/speaker_source/media_player.py b/esphome/components/speaker_source/media_player.py index 4f150e87fff..d69ee1881b8 100644 --- a/esphome/components/speaker_source/media_player.py +++ b/esphome/components/speaker_source/media_player.py @@ -2,6 +2,7 @@ from esphome import automation import esphome.codegen as cg from esphome.components import audio, media_player, media_source, speaker from esphome.components.const import ( + CONF_SOURCES, CONF_VOLUME_INCREMENT, CONF_VOLUME_INITIAL, CONF_VOLUME_MAX, @@ -29,7 +30,6 @@ CONF_ON_MUTE = "on_mute" CONF_PIPELINE = "pipeline" CONF_ON_UNMUTE = "on_unmute" CONF_ON_VOLUME = "on_volume" -CONF_SOURCES = "sources" speaker_source_ns = cg.esphome_ns.namespace("speaker_source")