Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.iqvia.sensor Namespace Reference

Classes

class  ForecastSensor
 
class  IndexSensor
 
class  Rating
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
str calculate_trend (list[float] indices)
 

Variables

dictionary API_CATEGORY_MAPPING
 
string ATTR_ALLERGEN_AMOUNT = "allergen_amount"
 
string ATTR_ALLERGEN_GENUS = "allergen_genus"
 
string ATTR_ALLERGEN_NAME = "allergen_name"
 
string ATTR_ALLERGEN_TYPE = "allergen_type"
 
string ATTR_CITY = "city"
 
string ATTR_OUTLOOK = "outlook"
 
string ATTR_RATING = "rating"
 
string ATTR_SEASON = "season"
 
string ATTR_TREND = "trend"
 
string ATTR_ZIP_CODE = "zip_code"
 
tuple FORECAST_SENSOR_DESCRIPTIONS
 
tuple INDEX_SENSOR_DESCRIPTIONS
 
string TREND_FLAT = "Flat"
 
string TREND_INCREASING = "Increasing"
 
string TREND_SUBSIDING = "Subsiding"
 

Detailed Description

Support for IQVIA sensors.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.iqvia.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up IQVIA sensors based on a config entry.

Definition at line 129 of file sensor.py.

◆ calculate_trend()

str homeassistant.components.iqvia.sensor.calculate_trend ( list[float]  indices)
Calculate the "moving average" of a set of indices.

Definition at line 160 of file sensor.py.

Variable Documentation

◆ API_CATEGORY_MAPPING

dictionary homeassistant.components.iqvia.sensor.API_CATEGORY_MAPPING
Initial value:
1 = {
2  TYPE_ALLERGY_TODAY: TYPE_ALLERGY_INDEX,
3  TYPE_ALLERGY_TOMORROW: TYPE_ALLERGY_INDEX,
4  TYPE_ASTHMA_TODAY: TYPE_ASTHMA_INDEX,
5  TYPE_ASTHMA_TOMORROW: TYPE_ASTHMA_INDEX,
6  TYPE_DISEASE_TODAY: TYPE_DISEASE_INDEX,
7 }

Definition at line 48 of file sensor.py.

◆ ATTR_ALLERGEN_AMOUNT

string homeassistant.components.iqvia.sensor.ATTR_ALLERGEN_AMOUNT = "allergen_amount"

Definition at line 37 of file sensor.py.

◆ ATTR_ALLERGEN_GENUS

string homeassistant.components.iqvia.sensor.ATTR_ALLERGEN_GENUS = "allergen_genus"

Definition at line 38 of file sensor.py.

◆ ATTR_ALLERGEN_NAME

string homeassistant.components.iqvia.sensor.ATTR_ALLERGEN_NAME = "allergen_name"

Definition at line 39 of file sensor.py.

◆ ATTR_ALLERGEN_TYPE

string homeassistant.components.iqvia.sensor.ATTR_ALLERGEN_TYPE = "allergen_type"

Definition at line 40 of file sensor.py.

◆ ATTR_CITY

string homeassistant.components.iqvia.sensor.ATTR_CITY = "city"

Definition at line 41 of file sensor.py.

◆ ATTR_OUTLOOK

string homeassistant.components.iqvia.sensor.ATTR_OUTLOOK = "outlook"

Definition at line 42 of file sensor.py.

◆ ATTR_RATING

string homeassistant.components.iqvia.sensor.ATTR_RATING = "rating"

Definition at line 43 of file sensor.py.

◆ ATTR_SEASON

string homeassistant.components.iqvia.sensor.ATTR_SEASON = "season"

Definition at line 44 of file sensor.py.

◆ ATTR_TREND

string homeassistant.components.iqvia.sensor.ATTR_TREND = "trend"

Definition at line 45 of file sensor.py.

◆ ATTR_ZIP_CODE

string homeassistant.components.iqvia.sensor.ATTR_ZIP_CODE = "zip_code"

Definition at line 46 of file sensor.py.

◆ FORECAST_SENSOR_DESCRIPTIONS

tuple homeassistant.components.iqvia.sensor.FORECAST_SENSOR_DESCRIPTIONS
Initial value:
1 = (
2  SensorEntityDescription(
3  key=TYPE_ALLERGY_FORECAST,
4  name="Allergy index: forecasted average",
5  icon="mdi:flower",
6  ),
7  SensorEntityDescription(
8  key=TYPE_ASTHMA_FORECAST,
9  name="Asthma index: forecasted average",
10  icon="mdi:flower",
11  ),
12  SensorEntityDescription(
13  key=TYPE_DISEASE_FORECAST,
14  name="Cold & flu: forecasted average",
15  icon="mdi:snowflake",
16  ),
17 )

Definition at line 79 of file sensor.py.

◆ INDEX_SENSOR_DESCRIPTIONS

tuple homeassistant.components.iqvia.sensor.INDEX_SENSOR_DESCRIPTIONS
Initial value:
1 = (
2  SensorEntityDescription(
3  key=TYPE_ALLERGY_TODAY,
4  name="Allergy index: today",
5  icon="mdi:flower",
6  state_class=SensorStateClass.MEASUREMENT,
7  ),
8  SensorEntityDescription(
9  key=TYPE_ALLERGY_TOMORROW,
10  name="Allergy index: tomorrow",
11  icon="mdi:flower",
12  ),
13  SensorEntityDescription(
14  key=TYPE_ASTHMA_TODAY,
15  name="Asthma index: today",
16  icon="mdi:flower",
17  state_class=SensorStateClass.MEASUREMENT,
18  ),
19  SensorEntityDescription(
20  key=TYPE_ASTHMA_TOMORROW,
21  name="Asthma index: tomorrow",
22  icon="mdi:flower",
23  ),
24  SensorEntityDescription(
25  key=TYPE_DISEASE_TODAY,
26  name="Cold & flu index: today",
27  icon="mdi:pill",
28  state_class=SensorStateClass.MEASUREMENT,
29  ),
30 )

Definition at line 97 of file sensor.py.

◆ TREND_FLAT

string homeassistant.components.iqvia.sensor.TREND_FLAT = "Flat"

Definition at line 74 of file sensor.py.

◆ TREND_INCREASING

string homeassistant.components.iqvia.sensor.TREND_INCREASING = "Increasing"

Definition at line 75 of file sensor.py.

◆ TREND_SUBSIDING

string homeassistant.components.iqvia.sensor.TREND_SUBSIDING = "Subsiding"

Definition at line 76 of file sensor.py.