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

Classes

class  RealtimeEmissionsSensor
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

string ATTR_BALANCING_AUTHORITY = "balancing_authority"
 
tuple REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS
 
string SENSOR_TYPE_REALTIME_EMISSIONS_MOER = "moer"
 
string SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT = "percent"
 

Detailed Description

Support for WattTime sensors.

Function Documentation

◆ async_setup_entry()

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

Definition at line 54 of file sensor.py.

Variable Documentation

◆ ATTR_BALANCING_AUTHORITY

string homeassistant.components.watttime.sensor.ATTR_BALANCING_AUTHORITY = "balancing_authority"

Definition at line 32 of file sensor.py.

◆ REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS

tuple homeassistant.components.watttime.sensor.REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS
Initial value:
1 = (
2  SensorEntityDescription(
3  key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER,
4  translation_key="marginal_operating_emissions_rate",
5  native_unit_of_measurement=f"{UnitOfMass.POUNDS} CO2/MWh",
6  state_class=SensorStateClass.MEASUREMENT,
7  ),
8  SensorEntityDescription(
9  key=SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT,
10  translation_key="relative_marginal_emissions_intensity",
11  native_unit_of_measurement=PERCENTAGE,
12  state_class=SensorStateClass.MEASUREMENT,
13  ),
14 )

Definition at line 38 of file sensor.py.

◆ SENSOR_TYPE_REALTIME_EMISSIONS_MOER

string homeassistant.components.watttime.sensor.SENSOR_TYPE_REALTIME_EMISSIONS_MOER = "moer"

Definition at line 34 of file sensor.py.

◆ SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT

string homeassistant.components.watttime.sensor.SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT = "percent"

Definition at line 35 of file sensor.py.