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

Classes

class  AnalyticsSensorEntityDescription
 
class  HomeassistantAnalyticsSensor
 

Functions

None async_setup_entry (HomeAssistant hass, AnalyticsInsightsConfigEntry entry, AddEntitiesCallback async_add_entities)
 
AnalyticsSensorEntityDescription get_addon_entity_description (str name_slug)
 
AnalyticsSensorEntityDescription get_core_integration_entity_description (str domain, str name)
 
AnalyticsSensorEntityDescription get_custom_integration_entity_description (str domain)
 

Variables

list GENERAL_SENSORS
 

Detailed Description

Sensor for Home Assistant analytics.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.analytics_insights.sensor.async_setup_entry ( HomeAssistant  hass,
AnalyticsInsightsConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Initialize the entries.

Definition at line 94 of file sensor.py.

◆ get_addon_entity_description()

AnalyticsSensorEntityDescription homeassistant.components.analytics_insights.sensor.get_addon_entity_description ( str  name_slug)
Get addon entity description.

Definition at line 32 of file sensor.py.

◆ get_core_integration_entity_description()

AnalyticsSensorEntityDescription homeassistant.components.analytics_insights.sensor.get_core_integration_entity_description ( str  domain,
str   name 
)
Get core integration entity description.

Definition at line 46 of file sensor.py.

◆ get_custom_integration_entity_description()

AnalyticsSensorEntityDescription homeassistant.components.analytics_insights.sensor.get_custom_integration_entity_description ( str  domain)
Get custom integration entity description.

Definition at line 60 of file sensor.py.

Variable Documentation

◆ GENERAL_SENSORS

list homeassistant.components.analytics_insights.sensor.GENERAL_SENSORS
Initial value:
1 = [
2  AnalyticsSensorEntityDescription(
3  key="total_active_installations",
4  translation_key="total_active_installations",
5  entity_registry_enabled_default=False,
6  state_class=SensorStateClass.TOTAL,
7  native_unit_of_measurement="active installations",
8  value_fn=lambda data: data.active_installations,
9  ),
10  AnalyticsSensorEntityDescription(
11  key="total_reports_integrations",
12  translation_key="total_reports_integrations",
13  entity_registry_enabled_default=False,
14  state_class=SensorStateClass.TOTAL,
15  native_unit_of_measurement="active installations",
16  value_fn=lambda data: data.reports_integrations,
17  ),
18 ]

Definition at line 74 of file sensor.py.