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

Classes

class  TasmotaSensor
 

Functions

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

Variables

string DEVICE_CLASS = "device_class"
 
string ICON = "icon"
 
dictionary SENSOR_UNIT_MAP
 
string STATE_CLASS = "state_class"
 

Detailed Description

Support for Tasmota sensors.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.tasmota.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up Tasmota sensor dynamically through discovery.

Definition at line 243 of file sensor.py.

Variable Documentation

◆ DEVICE_CLASS

string homeassistant.components.tasmota.sensor.DEVICE_CLASS = "device_class"

Definition at line 49 of file sensor.py.

◆ ICON

string homeassistant.components.tasmota.sensor.ICON = "icon"

Definition at line 51 of file sensor.py.

◆ SENSOR_UNIT_MAP

dictionary homeassistant.components.tasmota.sensor.SENSOR_UNIT_MAP
Initial value:
1 = {
2  hc.CONCENTRATION_MICROGRAMS_PER_CUBIC_METER: (
3  CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
4  ),
5  hc.CONCENTRATION_PARTS_PER_BILLION: CONCENTRATION_PARTS_PER_BILLION,
6  hc.CONCENTRATION_PARTS_PER_MILLION: CONCENTRATION_PARTS_PER_MILLION,
7  hc.ELECTRICAL_CURRENT_AMPERE: UnitOfElectricCurrent.AMPERE,
8  hc.ELECTRICAL_VOLT_AMPERE: UnitOfApparentPower.VOLT_AMPERE,
9  hc.ENERGY_KILO_WATT_HOUR: UnitOfEnergy.KILO_WATT_HOUR,
10  hc.FREQUENCY_HERTZ: UnitOfFrequency.HERTZ,
11  hc.LENGTH_CENTIMETERS: UnitOfLength.CENTIMETERS,
12  hc.LIGHT_LUX: LIGHT_LUX,
13  hc.MASS_KILOGRAMS: UnitOfMass.KILOGRAMS,
14  hc.PERCENTAGE: PERCENTAGE,
15  hc.POWER_WATT: UnitOfPower.WATT,
16  hc.PRESSURE_HPA: UnitOfPressure.HPA,
17  hc.REACTIVE_POWER: UnitOfReactivePower.VOLT_AMPERE_REACTIVE,
18  hc.SIGNAL_STRENGTH_DECIBELS: SIGNAL_STRENGTH_DECIBELS,
19  hc.SIGNAL_STRENGTH_DECIBELS_MILLIWATT: SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
20  hc.SPEED_KILOMETERS_PER_HOUR: UnitOfSpeed.KILOMETERS_PER_HOUR,
21  hc.SPEED_METERS_PER_SECOND: UnitOfSpeed.METERS_PER_SECOND,
22  hc.SPEED_MILES_PER_HOUR: UnitOfSpeed.MILES_PER_HOUR,
23  hc.TEMP_CELSIUS: UnitOfTemperature.CELSIUS,
24  hc.TEMP_FAHRENHEIT: UnitOfTemperature.FAHRENHEIT,
25  hc.TEMP_KELVIN: UnitOfTemperature.KELVIN,
26  hc.VOLT: UnitOfElectricPotential.VOLT,
27 }

Definition at line 214 of file sensor.py.

◆ STATE_CLASS

string homeassistant.components.tasmota.sensor.STATE_CLASS = "state_class"

Definition at line 50 of file sensor.py.