Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.rest Namespace Reference

Namespaces

 binary_sensor
 
 const
 
 data
 
 entity
 
 notify
 
 schema
 
 sensor
 
 switch
 
 util
 

Functions

bool _async_process_config (HomeAssistant hass, ConfigType config)
 
None _async_setup_shared_data (HomeAssistant hass)
 
DataUpdateCoordinator[None] _rest_coordinator (HomeAssistant hass, RestData rest, template.Template|None resource_template, template.Template|None payload_template, timedelta update_interval)
 
tuple[ConfigType, DataUpdateCoordinator[None], RestDataasync_get_config_and_coordinator (HomeAssistant hass, str platform_domain, DiscoveryInfoType discovery_info)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
RestData create_rest_data_from_config (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
list COORDINATOR_AWARE_PLATFORMS = [SENSOR_DOMAIN, BINARY_SENSOR_DOMAIN]
 
list PLATFORMS
 

Detailed Description

The rest component.

Function Documentation

◆ _async_process_config()

bool homeassistant.components.rest._async_process_config ( HomeAssistant  hass,
ConfigType  config 
)
private
Process rest configuration.

Definition at line 101 of file __init__.py.

◆ _async_setup_shared_data()

None homeassistant.components.rest._async_setup_shared_data ( HomeAssistant  hass)
private
Create shared data for platform config and rest coordinators.

Definition at line 96 of file __init__.py.

◆ _rest_coordinator()

DataUpdateCoordinator[None] homeassistant.components.rest._rest_coordinator ( HomeAssistant  hass,
RestData  rest,
template.Template | None  resource_template,
template.Template | None  payload_template,
timedelta  update_interval 
)
private
Wrap a DataUpdateCoordinator around the rest object.

Definition at line 159 of file __init__.py.

◆ async_get_config_and_coordinator()

tuple[ConfigType, DataUpdateCoordinator[None], RestData] homeassistant.components.rest.async_get_config_and_coordinator ( HomeAssistant  hass,
str  platform_domain,
DiscoveryInfoType   discovery_info 
)
Get the config and coordinator for the platform from discovery.

Definition at line 146 of file __init__.py.

◆ async_setup()

bool homeassistant.components.rest.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the rest platforms.

Definition at line 73 of file __init__.py.

◆ create_rest_data_from_config()

RestData homeassistant.components.rest.create_rest_data_from_config ( HomeAssistant  hass,
ConfigType  config 
)
Create RestData from config.

Definition at line 190 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.rest._LOGGER = logging.getLogger(__name__)
private

Definition at line 61 of file __init__.py.

◆ COORDINATOR_AWARE_PLATFORMS

list homeassistant.components.rest.COORDINATOR_AWARE_PLATFORMS = [SENSOR_DOMAIN, BINARY_SENSOR_DOMAIN]

Definition at line 70 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.rest.PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.NOTIFY,
4  Platform.SENSOR,
5  Platform.SWITCH,
6 ]

Definition at line 63 of file __init__.py.