1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 10:59:24 +00:00
Files
core/homeassistant/components/cloudflare/helpers.py

12 lines
316 B
Python

"""Helpers for the CloudFlare integration."""
import pycfdns
def get_zone_id(target_zone_name: str, zones: list[pycfdns.ZoneModel]) -> str | None:
"""Get the zone ID for the target zone name."""
for zone in zones:
if zone["name"] == target_zone_name:
return zone["id"]
return None