Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.airgradient.select Namespace Reference

Classes

class  AirGradientSelect
 
class  AirGradientSelectEntityDescription
 

Functions

str|None _get_value (int value, list[str] values)
 
None async_setup_entry (HomeAssistant hass, AirGradientConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

list ABC_DAYS
 
 CONFIG_CONTROL_ENTITY
 
list LEARNING_TIME_OFFSET_OPTIONS
 

Detailed Description

Support for AirGradient select entities.

Function Documentation

◆ _get_value()

str | None homeassistant.components.airgradient.select._get_value ( int  value,
list[str]  values 
)
private

Definition at line 100 of file select.py.

◆ async_setup_entry()

None homeassistant.components.airgradient.select.async_setup_entry ( HomeAssistant  hass,
AirGradientConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up AirGradient select entities based on a config entry.

Definition at line 140 of file select.py.

Variable Documentation

◆ ABC_DAYS

list homeassistant.components.airgradient.select.ABC_DAYS
Initial value:
1 = [
2  "1",
3  "8",
4  "30",
5  "90",
6  "180",
7  "0",
8 ]

Definition at line 90 of file select.py.

◆ CONFIG_CONTROL_ENTITY

homeassistant.components.airgradient.select.CONFIG_CONTROL_ENTITY
Initial value:
1 = AirGradientSelectEntityDescription(
2  key="configuration_control",
3  translation_key="configuration_control",
4  options=[ConfigurationControl.CLOUD.value, ConfigurationControl.LOCAL.value],
5  entity_category=EntityCategory.CONFIG,
6  value_fn=lambda config: (
7  config.configuration_control
8  if config.configuration_control is not ConfigurationControl.NOT_INITIALIZED
9  else None
10  ),
11  set_value_fn=lambda client, value: client.set_configuration_control(
12  ConfigurationControl(value)
13  ),
14 )

Definition at line 33 of file select.py.

◆ LEARNING_TIME_OFFSET_OPTIONS

list homeassistant.components.airgradient.select.LEARNING_TIME_OFFSET_OPTIONS
Initial value:
1 = [
2  "12",
3  "60",
4  "120",
5  "360",
6  "720",
7 ]

Definition at line 82 of file select.py.