2022-07-20 10:06:52 +00:00
|
|
|
"""The repairs integration."""
|
2022-07-08 03:49:07 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from homeassistant.helpers.typing import ConfigType
|
|
|
|
|
2022-07-12 17:26:06 +00:00
|
|
|
from . import issue_handler, websocket_api
|
2022-07-08 03:49:07 +00:00
|
|
|
from .const import DOMAIN
|
2022-07-21 09:11:51 +00:00
|
|
|
from .issue_handler import (
|
|
|
|
async_create_issue,
|
|
|
|
async_delete_issue,
|
|
|
|
create_issue,
|
|
|
|
delete_issue,
|
|
|
|
)
|
2022-07-08 03:49:07 +00:00
|
|
|
from .issue_registry import async_load as async_load_issue_registry
|
2022-07-20 12:00:35 +00:00
|
|
|
from .models import IssueSeverity, RepairsFlow
|
2022-07-08 03:49:07 +00:00
|
|
|
|
2022-07-20 12:00:35 +00:00
|
|
|
__all__ = [
|
|
|
|
"async_create_issue",
|
|
|
|
"async_delete_issue",
|
2022-07-21 09:11:51 +00:00
|
|
|
"create_issue",
|
|
|
|
"delete_issue",
|
2022-07-20 12:00:35 +00:00
|
|
|
"DOMAIN",
|
|
|
|
"IssueSeverity",
|
|
|
|
"RepairsFlow",
|
|
|
|
]
|
2022-07-08 03:49:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
2022-07-20 10:06:52 +00:00
|
|
|
"""Set up Repairs."""
|
2022-07-12 17:26:06 +00:00
|
|
|
hass.data[DOMAIN] = {}
|
|
|
|
|
|
|
|
issue_handler.async_setup(hass)
|
2022-07-08 03:49:07 +00:00
|
|
|
websocket_api.async_setup(hass)
|
|
|
|
await async_load_issue_registry(hass)
|
|
|
|
|
|
|
|
return True
|