From 10bf05ab0dff5004c8636a87ab6fda031e02a1f7 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 24 Jun 2025 22:59:46 +0200 Subject: [PATCH] migrate --- esphome/core/entity_helpers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/core/entity_helpers.py b/esphome/core/entity_helpers.py index 21ba9cc032..2928f07edf 100644 --- a/esphome/core/entity_helpers.py +++ b/esphome/core/entity_helpers.py @@ -1,6 +1,7 @@ from collections.abc import Callable import logging +import esphome.config_validation as cv from esphome.const import ( CONF_DEVICE_ID, CONF_DISABLED_BY_DEFAULT, @@ -206,9 +207,6 @@ def entity_duplicate_validator(platform: str) -> Callable[[ConfigType], ConfigTy # Check for duplicates unique_key = (device_id, platform, base_object_id) if unique_key in CORE.unique_ids: - # Import here to avoid circular dependency - import esphome.config_validation as cv - entity_name_display = entity_name or base_object_id device_prefix = f" on device '{device_name}'" if device_name else "" raise cv.Invalid(