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

Namespaces

 const
 
 sensor
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 
dict datapoints_greater_than_degree (dict value)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 COMPENSATION_SCHEMA
 
 CONFIG_SCHEMA
 

Detailed Description

The Compensation integration.

Function Documentation

◆ async_setup()

bool homeassistant.components.compensation.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the Compensation sensor.

Definition at line 80 of file __init__.py.

◆ datapoints_greater_than_degree()

dict homeassistant.components.compensation.datapoints_greater_than_degree ( dict  value)
Validate data point list is greater than polynomial degrees.

Definition at line 40 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 37 of file __init__.py.

◆ COMPENSATION_SCHEMA

homeassistant.components.compensation.COMPENSATION_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_SOURCE): cv.entity_id,
4  vol.Required(CONF_DATAPOINTS): [
5  vol.ExactSequence([vol.Coerce(float), vol.Coerce(float)])
6  ],
7  vol.Optional(CONF_UNIQUE_ID): cv.string,
8  vol.Optional(CONF_ATTRIBUTE): cv.string,
9  vol.Optional(CONF_UPPER_LIMIT, default=False): cv.boolean,
10  vol.Optional(CONF_LOWER_LIMIT, default=False): cv.boolean,
11  vol.Optional(CONF_PRECISION, default=DEFAULT_PRECISION): cv.positive_int,
12  vol.Optional(CONF_DEGREE, default=DEFAULT_DEGREE): vol.All(
13  vol.Coerce(int),
14  vol.Range(min=1, max=7),
15  ),
16  vol.Optional(CONF_UNIT_OF_MEASUREMENT): cv.string,
17  }
18 )

Definition at line 51 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.compensation.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: vol.Schema(
4  {cv.slug: vol.All(COMPENSATION_SCHEMA, datapoints_greater_than_degree)}
5  )
6  },
7  extra=vol.ALLOW_EXTRA,
8 )

Definition at line 70 of file __init__.py.