From 8b495ea941286333711263a65ef50d5f96de0cd4 Mon Sep 17 00:00:00 2001 From: j0ta29 Date: Mon, 22 Jul 2024 08:57:19 +0000 Subject: [PATCH] removed duplicate constant definition --- esphome/components/optolink/__init__.py | 1 - esphome/components/optolink/switch/__init__.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/components/optolink/__init__.py b/esphome/components/optolink/__init__.py index 998ebaca0d..e532b3e358 100644 --- a/esphome/components/optolink/__init__.py +++ b/esphome/components/optolink/__init__.py @@ -33,7 +33,6 @@ DAY_OF_WEEK = { CONF_DAY_OF_WEEK = "day_of_week" OptolinkComponent = optolink_ns.class_("Optolink", cg.Component) -CONF_OPTOLINK_ID = "optolink_id" SENSOR_BASE_SCHEMA = cv.Schema( { cv.GenerateID(CONF_OPTOLINK_ID): cv.use_id(OptolinkComponent), diff --git a/esphome/components/optolink/switch/__init__.py b/esphome/components/optolink/switch/__init__.py index 0d47229ca5..322b36ab04 100644 --- a/esphome/components/optolink/switch/__init__.py +++ b/esphome/components/optolink/switch/__init__.py @@ -3,7 +3,7 @@ import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import switch from esphome.const import CONF_ADDRESS, CONF_ID, CONF_UPDATE_INTERVAL -from .. import SENSOR_BASE_SCHEMA, optolink_ns +from .. import CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA, optolink_ns DEPENDENCIES = ["optolink"] CODEOWNERS = ["@j0ta29"] @@ -13,7 +13,6 @@ OptolinkSwitch = optolink_ns.class_( "OptolinkSwitch", switch.Switch, cg.PollingComponent ) -CONF_OPTOLINK_ID = "optolink_id" CONFIG_SCHEMA = ( switch.SWITCH_SCHEMA.extend( {