Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion esphome_selective_updates/esphome_smart_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down