mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 12:29:08 +00:00
FileConfiguration uses executor for I/O (#5652)
* FileConfiguration uses executor for I/O * Fix credentials tests * Remove migrate_system_env as its very deprecated
This commit is contained in:
@@ -10,7 +10,7 @@ from functools import partial
|
||||
import logging
|
||||
import os
|
||||
from types import MappingProxyType
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
from typing import TYPE_CHECKING, Any, Self, TypeVar
|
||||
|
||||
import aiohttp
|
||||
|
||||
@@ -102,6 +102,11 @@ class CoreSys:
|
||||
# Task factory attributes
|
||||
self._set_task_context: list[Callable[[Context], Context]] = []
|
||||
|
||||
async def load_config(self) -> Self:
|
||||
"""Load config in executor."""
|
||||
await self.config.read_data()
|
||||
return self
|
||||
|
||||
@property
|
||||
def dev(self) -> bool:
|
||||
"""Return True if we run dev mode."""
|
||||
|
||||
Reference in New Issue
Block a user