1 """The Backup integration."""
8 from .const
import DATA_MANAGER, DOMAIN, LOGGER
9 from .http
import async_register_http_views
10 from .manager
import BackupManager
11 from .websocket
import async_register_websocket_handlers
13 CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
16 async
def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
17 """Set up the Backup integration."""
19 hass.data[DATA_MANAGER] = backup_manager
28 "The backup integration is not supported on this installation method, "
29 "please remove it from your configuration"
33 async
def async_handle_create_service(call: ServiceCall) ->
None:
34 """Service handler for creating backups."""
35 await backup_manager.async_create_backup()
37 hass.services.async_register(DOMAIN,
"create", async_handle_create_service)
None async_register_http_views(HomeAssistant hass)
None async_register_websocket_handlers(HomeAssistant hass, bool with_hassio)
bool async_setup(HomeAssistant hass, ConfigType config)
bool is_hassio(HomeAssistant hass)