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

Namespaces

 config_flow
 
 const
 
 diagnostics
 
 entity
 
 sensor
 

Functions

None _standardize_geography_config_entry (HomeAssistant hass, ConfigEntry entry)
 
timedelta async_get_cloud_api_update_interval (HomeAssistant hass, str api_key, int num_consumers)
 
list[DataUpdateCoordinatorasync_get_cloud_coordinators_by_api_key (HomeAssistant hass, str api_key)
 
str async_get_geography_id (Mapping[str, Any] geography_dict)
 
bool async_migrate_entry (HomeAssistant hass, AirVisualConfigEntry entry)
 
None async_reload_entry (HomeAssistant hass, AirVisualConfigEntry entry)
 
bool async_setup_entry (HomeAssistant hass, AirVisualConfigEntry entry)
 
None async_sync_geo_coordinator_update_intervals (HomeAssistant hass, str api_key)
 
bool async_unload_entry (HomeAssistant hass, AirVisualConfigEntry entry)
 

Variables

 AirVisualConfigEntry
 
string DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
 
string DOMAIN_AIRVISUAL_PRO = "airvisual_pro"
 
list PLATFORMS = [Platform.SENSOR]
 

Detailed Description

The AirVisual component.

Function Documentation

◆ _standardize_geography_config_entry()

None homeassistant.components.airvisual._standardize_geography_config_entry ( HomeAssistant  hass,
ConfigEntry   entry 
)
private
Ensure that geography config entries have appropriate properties.

Definition at line 137 of file __init__.py.

◆ async_get_cloud_api_update_interval()

timedelta homeassistant.components.airvisual.async_get_cloud_api_update_interval ( HomeAssistant  hass,
str  api_key,
int   num_consumers 
)
Get a leveled scan interval for a particular cloud API key.

This will shift based on the number of active consumers, thus keeping the user
under the monthly API limit.

Definition at line 63 of file __init__.py.

◆ async_get_cloud_coordinators_by_api_key()

list[DataUpdateCoordinator] homeassistant.components.airvisual.async_get_cloud_coordinators_by_api_key ( HomeAssistant  hass,
str   api_key 
)
Get all DataUpdateCoordinator objects related to a particular API key.

Definition at line 86 of file __init__.py.

◆ async_get_geography_id()

str homeassistant.components.airvisual.async_get_geography_id ( Mapping[str, Any]  geography_dict)
Generate a unique ID from a geography dict.

Definition at line 98 of file __init__.py.

◆ async_migrate_entry()

bool homeassistant.components.airvisual.async_migrate_entry ( HomeAssistant  hass,
AirVisualConfigEntry  entry 
)
Migrate an old config entry.

Definition at line 230 of file __init__.py.

◆ async_reload_entry()

None homeassistant.components.airvisual.async_reload_entry ( HomeAssistant  hass,
AirVisualConfigEntry  entry 
)
Handle an options update.

Definition at line 399 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.airvisual.async_setup_entry ( HomeAssistant  hass,
AirVisualConfigEntry  entry 
)
Set up AirVisual as config entry.

Definition at line 171 of file __init__.py.

◆ async_sync_geo_coordinator_update_intervals()

None homeassistant.components.airvisual.async_sync_geo_coordinator_update_intervals ( HomeAssistant  hass,
str   api_key 
)
Sync the update interval for geography-based data coordinators (by API key).

Definition at line 114 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.airvisual.async_unload_entry ( HomeAssistant  hass,
AirVisualConfigEntry  entry 
)
Unload an AirVisual config entry.

Definition at line 387 of file __init__.py.

Variable Documentation

◆ AirVisualConfigEntry

homeassistant.components.airvisual.AirVisualConfigEntry

Definition at line 51 of file __init__.py.

◆ DEFAULT_ATTRIBUTION

string homeassistant.components.airvisual.DEFAULT_ATTRIBUTION = "Data provided by AirVisual"

Definition at line 59 of file __init__.py.

◆ DOMAIN_AIRVISUAL_PRO

string homeassistant.components.airvisual.DOMAIN_AIRVISUAL_PRO = "airvisual_pro"

Definition at line 55 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.airvisual.PLATFORMS = [Platform.SENSOR]

Definition at line 57 of file __init__.py.