From 304627efd36bfce05f0742b00484cadfc0d27368 Mon Sep 17 00:00:00 2001 From: Remco van Essen Date: Thu, 15 Oct 2026 22:34:00 +0200 Subject: [PATCH] [ld2410][ld2412] Move CONF_OUT_PIN_LEVEL to the shared constants (#20820) --- esphome/components/const/__init__.py | 1 + esphome/components/ld2410/select/__init__.py | 2 +- esphome/components/ld2412/select/__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 dcf40d2a07c..3a531978aaa 100644 --- a/esphome/components/const/__init__.py +++ b/esphome/components/const/__init__.py @@ -52,6 +52,7 @@ CONF_ON_RECEIVE = "on_receive" CONF_ON_SCAN_END = "on_scan_end" CONF_ON_STATE_CHANGE = "on_state_change" CONF_ON_STOP = "on_stop" +CONF_OUT_PIN_LEVEL = "out_pin_level" CONF_PARITY = "parity" CONF_RECEIVER_FREQUENCY = "receiver_frequency" CONF_RECONNECT_INTERVAL = "reconnect_interval" diff --git a/esphome/components/ld2410/select/__init__.py b/esphome/components/ld2410/select/__init__.py index 936ad83d39d..e1129ac9524 100644 --- a/esphome/components/ld2410/select/__init__.py +++ b/esphome/components/ld2410/select/__init__.py @@ -1,5 +1,6 @@ import esphome.codegen as cg from esphome.components import select +from esphome.components.const import CONF_OUT_PIN_LEVEL import esphome.config_validation as cv from esphome.const import ( CONF_BAUD_RATE, @@ -20,7 +21,6 @@ LightOutControlSelect = ld2410_ns.class_("LightOutControlSelect", select.Select) CONF_DISTANCE_RESOLUTION = "distance_resolution" CONF_LIGHT_FUNCTION = "light_function" -CONF_OUT_PIN_LEVEL = "out_pin_level" CONFIG_SCHEMA = { diff --git a/esphome/components/ld2412/select/__init__.py b/esphome/components/ld2412/select/__init__.py index 40a075e5d54..5249e9b97a6 100644 --- a/esphome/components/ld2412/select/__init__.py +++ b/esphome/components/ld2412/select/__init__.py @@ -1,5 +1,6 @@ import esphome.codegen as cg from esphome.components import select +from esphome.components.const import CONF_OUT_PIN_LEVEL import esphome.config_validation as cv from esphome.const import ( CONF_BAUD_RATE, @@ -20,7 +21,6 @@ LightOutControlSelect = LD2412_ns.class_("LightOutControlSelect", select.Select) CONF_DISTANCE_RESOLUTION = "distance_resolution" CONF_LIGHT_FUNCTION = "light_function" -CONF_OUT_PIN_LEVEL = "out_pin_level" CONFIG_SCHEMA = {