Initial commit.

This commit is contained in:
2025-04-21 21:03:30 -04:00
commit d4f58c985f
2077 changed files with 75132 additions and 0 deletions
@@ -0,0 +1,27 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from .const import DOMAIN
async def async_setup(hass: HomeAssistant, config: dict):
"""Set up the Cloudflare Tunnel component."""
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up Cloudflare Tunnel from a config entry."""
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][entry.entry_id] = entry.data
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"])
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Unload a config entry."""
unload_ok = await hass.config_entries.async_forward_entry_unload(entry, "sensor")
if unload_ok:
hass.data[DOMAIN].pop(entry.entry_id)
else:
_LOGGER.error("Failed to unload entry: %s", entry.entry_id)
return unload_ok