From 82a0c5b2f55f1ca638bf093e7b3b69e7d6dbc74f Mon Sep 17 00:00:00 2001 From: Bryce Boe Date: Wed, 21 Oct 2026 01:13:35 -0700 Subject: [PATCH] [sx126x][sx127x] Move CONF_BITRATE to the shared component constants (#21261) --- esphome/components/const/__init__.py | 1 + esphome/components/sx126x/__init__.py | 2 +- esphome/components/sx127x/__init__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/components/const/__init__.py b/esphome/components/const/__init__.py index b0256c1e99f..b58db9aa388 100644 --- a/esphome/components/const/__init__.py +++ b/esphome/components/const/__init__.py @@ -15,6 +15,7 @@ CONF_ANNOUNCEMENT_VOLUME = "announcement_volume" CONF_AQI = "aqi" CONF_AUTOMATIC_BASELINE_CALIBRATION = "automatic_baseline_calibration" CONF_B_CONSTANT = "b_constant" +CONF_BITRATE = "bitrate" CONF_BLUE_CHANNEL = "blue_channel" CONF_BORDER_ROUTER = "border_router" CONF_BREATH_VOC_EQUIVALENT = "breath_voc_equivalent" diff --git a/esphome/components/sx126x/__init__.py b/esphome/components/sx126x/__init__.py index c5671605954..5bc6a2c970c 100644 --- a/esphome/components/sx126x/__init__.py +++ b/esphome/components/sx126x/__init__.py @@ -4,6 +4,7 @@ from esphome import automation, pins import esphome.codegen as cg from esphome.components import spi from esphome.components.const import ( + CONF_BITRATE, CONF_CRC_ENABLE, CONF_MODULATION, CONF_ON_PACKET, @@ -23,7 +24,6 @@ DEPENDENCIES = ["spi"] CONF_SX126X_ID = "sx126x_id" CONF_BANDWIDTH = "bandwidth" -CONF_BITRATE = "bitrate" CONF_CODING_RATE = "coding_rate" CONF_COLD = "cold" CONF_CRC_INVERTED = "crc_inverted" diff --git a/esphome/components/sx127x/__init__.py b/esphome/components/sx127x/__init__.py index 534c2498e77..daf501f3258 100644 --- a/esphome/components/sx127x/__init__.py +++ b/esphome/components/sx127x/__init__.py @@ -4,6 +4,7 @@ from esphome import automation, pins import esphome.codegen as cg from esphome.components import spi from esphome.components.const import ( + CONF_BITRATE, CONF_CRC_ENABLE, CONF_MODULATION, CONF_ON_PACKET, @@ -24,7 +25,6 @@ CONF_SX127X_ID = "sx127x_id" CONF_AUTO_CAL = "auto_cal" CONF_BANDWIDTH = "bandwidth" -CONF_BITRATE = "bitrate" CONF_BITSYNC = "bitsync" CONF_CODING_RATE = "coding_rate" CONF_DEVIATION = "deviation"