hass-core/homeassistant/components/thread/__init__.py
Erik Montnemery 527de22adf
Add thread dataset store (#87187)
* Add thread dataset store

* Address review comments

* Bump python-otbr-api to 1.0.3

* Remove stuff which we don't need yet
2023-02-03 09:47:41 -05:00

38 lines
1 KiB
Python

"""The Thread integration."""
from __future__ import annotations
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
from .const import DOMAIN
from .dataset_store import DatasetEntry, async_add_dataset
__all__ = [
"DOMAIN",
"DatasetEntry",
"async_add_dataset",
]
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Thread integration."""
if not hass.config_entries.async_entries(DOMAIN):
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}
)
)
hass.data[DOMAIN] = {}
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up a config entry."""
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
return True