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

Namespaces

 const
 
 sensor
 

Classes

class  InfluxClient
 
class  InfluxThread
 

Functions

Callable[[Event], dict[str, Any]|None] _generate_event_to_json (dict conf)
 
None _retry_setup (HomeAssistant hass, ConfigType config)
 
dict create_influx_url (dict conf)
 
InfluxClient get_influx_connection (conf, test_write=False, test_read=False)
 
bool setup (HomeAssistant hass, ConfigType config)
 
dict validate_version_specific_config (dict conf)
 

Variables

 _CUSTOMIZE_ENTITY_SCHEMA
 
 _INFLUX_BASE_SCHEMA
 
 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA
 
 INFLUX_SCHEMA
 

Detailed Description

Support for sending data to an Influx database.

Function Documentation

◆ _generate_event_to_json()

Callable[[Event], dict[str, Any] | None] homeassistant.components.influxdb._generate_event_to_json ( dict  conf)
private
Build event to json converter and add to config.

Definition at line 204 of file __init__.py.

◆ _retry_setup()

None homeassistant.components.influxdb._retry_setup ( HomeAssistant  hass,
ConfigType  config 
)
private

Definition at line 478 of file __init__.py.

◆ create_influx_url()

dict homeassistant.components.influxdb.create_influx_url ( dict  conf)
Build URL used from config inputs and default when necessary.

Definition at line 109 of file __init__.py.

◆ get_influx_connection()

InfluxClient homeassistant.components.influxdb.get_influx_connection (   conf,
  test_write = False,
  test_read = False 
)
Create the correct influx connection for the API version.

Definition at line 334 of file __init__.py.

◆ setup()

bool homeassistant.components.influxdb.setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the InfluxDB component.

Definition at line 482 of file __init__.py.

◆ validate_version_specific_config()

dict homeassistant.components.influxdb.validate_version_specific_config ( dict  conf)
Ensure correct config fields are provided based on API version used.

Definition at line 134 of file __init__.py.

Variable Documentation

◆ _CUSTOMIZE_ENTITY_SCHEMA

homeassistant.components.influxdb._CUSTOMIZE_ENTITY_SCHEMA
private
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_OVERRIDE_MEASUREMENT): cv.string,
4  vol.Optional(CONF_IGNORE_ATTRIBUTES): vol.All(cv.ensure_list, [cv.string]),
5  }
6 )

Definition at line 158 of file __init__.py.

◆ _INFLUX_BASE_SCHEMA

homeassistant.components.influxdb._INFLUX_BASE_SCHEMA
private
Initial value:
1 = INCLUDE_EXCLUDE_BASE_FILTER_SCHEMA.extend(
2  {
3  vol.Optional(CONF_RETRY_COUNT, default=0): cv.positive_int,
4  vol.Optional(CONF_DEFAULT_MEASUREMENT): cv.string,
5  vol.Optional(CONF_MEASUREMENT_ATTR, default=DEFAULT_MEASUREMENT_ATTR): vol.In(
6  ["unit_of_measurement", "domain__device_class", "entity_id"]
7  ),
8  vol.Optional(CONF_OVERRIDE_MEASUREMENT): cv.string,
9  vol.Optional(CONF_TAGS, default={}): vol.Schema({cv.string: cv.string}),
10  vol.Optional(CONF_TAGS_ATTRIBUTES, default=[]): vol.All(
11  cv.ensure_list, [cv.string]
12  ),
13  vol.Optional(CONF_IGNORE_ATTRIBUTES, default=[]): vol.All(
14  cv.ensure_list, [cv.string]
15  ),
16  vol.Optional(CONF_COMPONENT_CONFIG, default={}): vol.Schema(
17  {cv.entity_id: _CUSTOMIZE_ENTITY_SCHEMA}
18  ),
19  vol.Optional(CONF_COMPONENT_CONFIG_GLOB, default={}): vol.Schema(
20  {cv.string: _CUSTOMIZE_ENTITY_SCHEMA}
21  ),
22  vol.Optional(CONF_COMPONENT_CONFIG_DOMAIN, default={}): vol.Schema(
23  {cv.string: _CUSTOMIZE_ENTITY_SCHEMA}
24  ),
25  }
26 )

Definition at line 165 of file __init__.py.

◆ _LOGGER

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

Definition at line 106 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.influxdb.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {DOMAIN: INFLUX_SCHEMA},
3  extra=vol.ALLOW_EXTRA,
4 )

Definition at line 198 of file __init__.py.

◆ INFLUX_SCHEMA

homeassistant.components.influxdb.INFLUX_SCHEMA
Initial value:
1 = vol.All(
2  _INFLUX_BASE_SCHEMA.extend(COMPONENT_CONFIG_SCHEMA_CONNECTION),
3  validate_version_specific_config,
4  create_influx_url,
5 )

Definition at line 192 of file __init__.py.