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

Classes

class  AttributeSensor
 
class  AttributeSensorDescription
 

Functions

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

Variables

tuple ATTRIBUTE_SENSORS
 

Detailed Description

Support for power sensors in WeMo Insight devices.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.wemo.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  _config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up WeMo sensors.

Definition at line 59 of file sensor.py.

Variable Documentation

◆ ATTRIBUTE_SENSORS

tuple homeassistant.components.wemo.sensor.ATTRIBUTE_SENSORS
Initial value:
1 = (
2  AttributeSensorDescription(
3  name="Current Power",
4  device_class=SensorDeviceClass.POWER,
5  state_class=SensorStateClass.MEASUREMENT,
6  native_unit_of_measurement=UnitOfPower.WATT,
7  key="current_power_watts",
8  unique_id_suffix="currentpower",
9  state_conversion=lambda state: round(cast(float, state), 2),
10  ),
11  AttributeSensorDescription(
12  name="Today Energy",
13  device_class=SensorDeviceClass.ENERGY,
14  state_class=SensorStateClass.TOTAL_INCREASING,
15  native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
16  key="today_kwh",
17  unique_id_suffix="todaymw",
18  state_conversion=lambda state: round(cast(float, state), 2),
19  ),
20 )

Definition at line 37 of file sensor.py.