From b0cf570add48446a3f3be3e4232a947395e1c2a6 Mon Sep 17 00:00:00 2001 From: David Rothenberger Date: Fri, 5 Dec 2025 11:23:59 -0800 Subject: [PATCH] fix: ignore `secrets.yaml` file --- esphome_selective_updates/esphome_smart_updater.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome_selective_updates/esphome_smart_updater.py b/esphome_selective_updates/esphome_smart_updater.py index c047498..c21b2e3 100644 --- a/esphome_selective_updates/esphome_smart_updater.py +++ b/esphome_selective_updates/esphome_smart_updater.py @@ -247,11 +247,15 @@ def discover_devices() -> List[dict]: return out for yaml_file in sorted(ESPHOME_CONFIG_DIR.glob("*.yaml")): + # Ignore secrets.yaml + if Path(yaml_file).stem == "secrets": + continue + try: text = yaml_file.read_text(encoding="utf-8", errors="ignore") except Exception: text = "" - + # Extract IP address (if manually configured) ip = None m_ip = re.search(r"manual_ip\s*:\s*([0-9]{1,3}(?:\.[0-9]{1,3}){3})", text)