Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.hassio.handler Namespace Reference

Classes

class  HassIO
 
class  HassioAPIError
 

Functions

Callable[_P, Coroutine[Any, Any, bool]] _P (Callable[_P, Coroutine[Any, Any, dict[str, Any]]] funct)
 
dict async_create_backup (HomeAssistant hass, dict payload, bool partial=False)
 
dict[str, bool] async_get_green_settings (HomeAssistant hass)
 
dict[str, bool] async_get_yellow_settings (HomeAssistant hass)
 
dict async_reboot_host (HomeAssistant hass)
 
dict async_set_green_settings (HomeAssistant hass, dict[str, bool] settings)
 
dict async_set_yellow_settings (HomeAssistant hass, dict[str, bool] settings)
 
bool async_update_diagnostics (HomeAssistant hass, bool diagnostics)
 
SupervisorClient get_supervisor_client (HomeAssistant hass)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string KEY_SUPERVISOR_CLIENT = "supervisor_client"
 

Detailed Description

Handler for Hass.io.

Function Documentation

◆ _P()

Callable[_P, Coroutine[Any, Any, bool]] homeassistant.components.hassio.handler._P ( Callable[_P, Coroutine[Any, Any, dict[str, Any]]]  funct)
private
Return a boolean.
Return data of an api.

Definition at line 38 of file handler.py.

◆ async_create_backup()

dict homeassistant.components.hassio.handler.async_create_backup ( HomeAssistant  hass,
dict  payload,
bool   partial = False 
)
Create a full or partial backup.

The caller of the function should handle HassioAPIError.

Definition at line 81 of file handler.py.

◆ async_get_green_settings()

dict[str, bool] homeassistant.components.hassio.handler.async_get_green_settings ( HomeAssistant  hass)
Return settings specific to Home Assistant Green.

Definition at line 95 of file handler.py.

◆ async_get_yellow_settings()

dict[str, bool] homeassistant.components.hassio.handler.async_get_yellow_settings ( HomeAssistant  hass)
Return settings specific to Home Assistant Yellow.

Definition at line 116 of file handler.py.

◆ async_reboot_host()

dict homeassistant.components.hassio.handler.async_reboot_host ( HomeAssistant  hass)
Reboot the host.

Returns an empty dict.

Definition at line 137 of file handler.py.

◆ async_set_green_settings()

dict homeassistant.components.hassio.handler.async_set_green_settings ( HomeAssistant  hass,
dict[str, bool]   settings 
)
Set settings specific to Home Assistant Green.

Returns an empty dict.

Definition at line 102 of file handler.py.

◆ async_set_yellow_settings()

dict homeassistant.components.hassio.handler.async_set_yellow_settings ( HomeAssistant  hass,
dict[str, bool]   settings 
)
Set settings specific to Home Assistant Yellow.

Returns an empty dict.

Definition at line 123 of file handler.py.

◆ async_update_diagnostics()

bool homeassistant.components.hassio.handler.async_update_diagnostics ( HomeAssistant  hass,
bool  diagnostics 
)
Update Supervisor diagnostics toggle.

The caller of the function should handle HassioAPIError.

Definition at line 70 of file handler.py.

◆ get_supervisor_client()

SupervisorClient homeassistant.components.hassio.handler.get_supervisor_client ( HomeAssistant  hass)
Return supervisor client.

Definition at line 344 of file handler.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.hassio.handler._LOGGER = logging.getLogger(__name__)
private

Definition at line 29 of file handler.py.

◆ KEY_SUPERVISOR_CLIENT

string homeassistant.components.hassio.handler.KEY_SUPERVISOR_CLIENT = "supervisor_client"

Definition at line 31 of file handler.py.