diff --git a/custom_components/$REPO_NAME/__init__.py b/custom_components/$REPO_NAME/__init__.py new file mode 100644 index 0000000..3bbc583 --- /dev/null +++ b/custom_components/$REPO_NAME/__init__.py @@ -0,0 +1,23 @@ +"""The $REPO_NAME integration.""" +import logging +from homeassistant.core import HomeAssistant +from homeassistant.config_entries import ConfigEntry +from .const import DOMAIN + +_LOGGER = logging.getLogger(__name__) + +async def async_setup(hass: HomeAssistant, config: dict) -> bool: + """Set up the $REPO_NAME component from yaml configuration.""" + hass.data.setdefault(DOMAIN, {}) + return True + +async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Set up $REPO_NAME from a config entry.""" + hass.data.setdefault(DOMAIN, {}) + hass.data[DOMAIN][entry.entry_id] = {} + await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) + return True + +async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Unload a config entry.""" + return await hass.config_entries.async_unload_platforms(entry, ["sensor"]) \ No newline at end of file