Public Member Functions | |
| None | __init__ (self, str config_dir) |
| Self | __new__ (cls, str config_dir) |
| str | __repr__ (self) |
| CALLBACK_TYPE | async_add_shutdown_job (self, HassJob[..., Coroutine[Any, Any, Any]] hassjob, *Any args) |
| CALLBACK_TYPE | async_add_shutdown_job (self, HassJob[..., Coroutine[Any, Any, Any]|Any] hassjob, *Any args) |
| CALLBACK_TYPE | async_add_shutdown_job (self, HassJob[..., Coroutine[Any, Any, Any]|Any] hassjob, *Any args) |
| None | async_block_till_done (self, bool wait_background_tasks=False) |
| int | async_run (self, *bool attach_signals=True) |
| None | async_start (self) |
| None | async_stop (self, int exit_code=0, *bool force=False) |
| None | block_till_done (self, bool wait_background_tasks=False) |
| None | create_task (self, Coroutine[Any, Any, Any] target, str|None name=None) |
| bool | is_running (self) |
| bool | is_stopping (self) |
| None | set_state (self, CoreState state) |
| int | start (self) |
| None | stop (self) |
| None | verify_event_loop_thread (self, str what) |
Public Attributes | |
| bus | |
| components | |
| config | |
| data | |
| exit_code | |
| helpers | |
| import_executor | |
| loop | |
| loop_thread_id | |
| services | |
| state | |
| states | |
Static Public Attributes | |
| ConfigEntries | |
| HomeAssistantHTTP | |
Private Member Functions | |
| set[asyncio.Future[Any]] | _active_tasks (self) |
| None | _async_log_running_tasks (self, str stage) |
| None | _await_and_log_pending (self, Collection[asyncio.Future[Any]] pending) |
| None | _cancel_cancellable_timers (self) |
| asyncio.Future[_R]|None | _R (self, Coroutine[Any, Any, _R] target, *Any args) |
| asyncio.Future[_R]|None | _R (self, Coroutine[Any, Any, _R] target, *Any args, bool eager_start=False) |
| asyncio.Task[_R] | _R (self, Coroutine[Any, Any, _R] target, str name, bool eager_start=True) |
| asyncio.Task[_R] | _R (self, Coroutine[Any, Any, _R] target, str|None name=None, bool eager_start=True) |
| asyncio.Task[_R] | _R (self, Coroutine[Any, Any, _R] target, str|None name=None, bool eager_start=True) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]] hassjob, *Any args, bool eager_start=False, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool eager_start=False, bool background=False) |
| asyncio.Future[_R]|None | _R (self, HassJob[..., Coroutine[Any, Any, _R]|_R] hassjob, *Any args, bool eager_start=False, bool background=False) |
| asyncio.Future[_T] | _T (self, Callable[[*_Ts], _T] target, **_Ts args) |
| asyncio.Future[_T] | _T (self, Callable[[*_Ts], _T] target, **_Ts args) |
| None | _Ts (self, Callable[[*_Ts], Any]|Coroutine[Any, Any, Any] target, **_Ts args) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]] target, **_Ts args) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]] target, **_Ts args, bool eager_start=False) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]|_R] target, **_Ts args) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]|_R] target, **_Ts args, bool eager_start=False) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]|_R]|Coroutine[Any, Any, _R] target, **_Ts args) |
| asyncio.Future[_R]|None | _Ts (self, Callable[[*_Ts], Coroutine[Any, Any, _R]|_R]|Coroutine[Any, Any, _R] target, **_Ts args, bool eager_start=False) |
Private Attributes | |
| _stop_future | |
| _stopped | |
| _tasks | |
| None homeassistant.core.HomeAssistant.__init__ | ( | self, | |
| str | config_dir | ||
| ) |
| Self homeassistant.core.HomeAssistant.__new__ | ( | cls, | |
| str | config_dir | ||
| ) |
| str homeassistant.core.HomeAssistant.__repr__ | ( | self | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Create a task from within the event loop. This type of task is for background tasks that usually run for the lifetime of Home Assistant or an integration's setup. A background task is different from a normal task: - Will not block startup - Will be automatically cancelled on shutdown - Calls to async_block_till_done will not wait for completion If you are using this in your integration, use the create task methods on the config entry instead. This method must be run in the event loop.
|
private |
|
private |
Create a task from within the event loop, internal use only. This method is intended to only be used by core internally and should not be considered a stable API. We will make breaking changes to this function in the future and it should not be used in integrations. This method must be run in the event loop. If you are using this in your integration, use the create task methods on the config entry instead. target: target to call.
|
private |
|
private |
|
private |
|
private |
|
private |
Add a HassJob from within the event loop. If eager_start is True, coroutine functions will be scheduled eagerly. If background is True, the task will created as a background task. This method must be run in the event loop. hassjob: HassJob to call. args: parameters for method to call.
|
private |
|
private |
|
private |
|
private |
Add a HassJob from within the event loop. If eager_start is True, coroutine functions will be scheduled eagerly. If background is True, the task will created as a background task. This method must be run in the event loop. hassjob: HassJob to call. args: parameters for method to call.
|
private |
|
private |
Add a job to be executed by the event loop or by an executor. If the job is either a coroutine or decorated with @callback, it will be run by the event loop, if not it will be run by an executor. This method must be run in the event loop. target: target to call. args: parameters for method to call.
| CALLBACK_TYPE homeassistant.core.HomeAssistant.async_add_shutdown_job | ( | self, | |
| HassJob[..., Coroutine[Any, Any, Any]] | hassjob, | ||
| *Any | args | ||
| ) |
| CALLBACK_TYPE homeassistant.core.HomeAssistant.async_add_shutdown_job | ( | self, | |
| HassJob[..., Coroutine[Any, Any, Any] | Any] | hassjob, | ||
| *Any | args | ||
| ) |
| CALLBACK_TYPE homeassistant.core.HomeAssistant.async_add_shutdown_job | ( | self, | |
| HassJob[..., Coroutine[Any, Any, Any] | Any] | hassjob, | ||
| *Any | args | ||
| ) |
| None homeassistant.core.HomeAssistant.async_block_till_done | ( | self, | |
| bool | wait_background_tasks = False |
||
| ) |
| int homeassistant.core.HomeAssistant.async_run | ( | self, | |
| *bool | attach_signals = True |
||
| ) |
| None homeassistant.core.HomeAssistant.async_start | ( | self | ) |
| None homeassistant.core.HomeAssistant.async_stop | ( | self, | |
| int | exit_code = 0, |
||
| *bool | force = False |
||
| ) |
| None homeassistant.core.HomeAssistant.block_till_done | ( | self, | |
| bool | wait_background_tasks = False |
||
| ) |
| None homeassistant.core.HomeAssistant.create_task | ( | self, | |
| Coroutine[Any, Any, Any] | target, | ||
| str | None | name = None |
||
| ) |
| bool homeassistant.core.HomeAssistant.is_running | ( | self | ) |
| bool homeassistant.core.HomeAssistant.is_stopping | ( | self | ) |
| None homeassistant.core.HomeAssistant.set_state | ( | self, | |
| CoreState | state | ||
| ) |
| int homeassistant.core.HomeAssistant.start | ( | self | ) |
| None homeassistant.core.HomeAssistant.stop | ( | self | ) |
| None homeassistant.core.HomeAssistant.verify_event_loop_thread | ( | self, | |
| str | what | ||
| ) |