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

Classes

class  WithingsActivitySensor
 
class  WithingsActivitySensorEntityDescription
 
class  WithingsDeviceSensor
 
class  WithingsDeviceSensorEntityDescription
 
class  WithingsGoalsSensor
 
class  WithingsGoalsSensorEntityDescription
 
class  WithingsMeasurementSensor
 
class  WithingsMeasurementSensorEntityDescription
 
class  WithingsSensor
 
class  WithingsSleepSensor
 
class  WithingsSleepSensorEntityDescription
 
class  WithingsWorkoutSensor
 
class  WithingsWorkoutSensorEntityDescription
 

Functions

None __init__ (self, _T coordinator, _ED entity_description)
 
None async_setup_entry (HomeAssistant hass, WithingsConfigEntry entry, AddEntitiesCallback async_add_entities)
 
set[str] get_current_goals (Goals goals)
 
WithingsMeasurementSensorEntityDescription|None get_measurement_description (tuple[MeasurementType, MeasurementPosition|None] measurement)
 
WithingsMeasurementSensorEntityDescription|None get_positional_measurement_description (MeasurementType measurement_type, MeasurementPosition measurement_position)
 

Variables

list _WORKOUT_CATEGORY
 
list ACTIVITY_SENSORS
 
list DEVICE_SENSORS
 
 entity_description
 
string SLEEP_GOAL = "sleep"
 
list SLEEP_SENSORS
 
string STEP_GOAL = "steps"
 
string WEIGHT_GOAL = "weight"
 
list WORKOUT_SENSORS
 

Detailed Description

Sensors flow for Withings.

Function Documentation

◆ __init__()

None homeassistant.components.withings.sensor.__init__ (   self,
_T  coordinator,
_ED  entity_description 
)
Implementation of a Withings sensor.
Initialize sensor.

Definition at line 883 of file sensor.py.

◆ async_setup_entry()

None homeassistant.components.withings.sensor.async_setup_entry ( HomeAssistant  hass,
WithingsConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up the sensor config entry.

Definition at line 683 of file sensor.py.

◆ get_current_goals()

set[str] homeassistant.components.withings.sensor.get_current_goals ( Goals  goals)
Return a list of present goals.

Definition at line 674 of file sensor.py.

◆ get_measurement_description()

WithingsMeasurementSensorEntityDescription | None homeassistant.components.withings.sensor.get_measurement_description ( tuple[MeasurementType, MeasurementPosition | None]  measurement)
Get the sensor description for a measurement type.

Definition at line 297 of file sensor.py.

◆ get_positional_measurement_description()

WithingsMeasurementSensorEntityDescription | None homeassistant.components.withings.sensor.get_positional_measurement_description ( MeasurementType  measurement_type,
MeasurementPosition   measurement_position 
)
Get the sensor description for a measurement type.

Definition at line 268 of file sensor.py.

Variable Documentation

◆ _WORKOUT_CATEGORY

list homeassistant.components.withings.sensor._WORKOUT_CATEGORY
private
Initial value:
1 = [
2  workout_category.name.lower() for workout_category in WorkoutCategory
3 ]

Definition at line 595 of file sensor.py.

◆ ACTIVITY_SENSORS

list homeassistant.components.withings.sensor.ACTIVITY_SENSORS

Definition at line 465 of file sensor.py.

◆ DEVICE_SENSORS

list homeassistant.components.withings.sensor.DEVICE_SENSORS
Initial value:
1 = [
2  WithingsDeviceSensorEntityDescription(
3  key="battery",
4  translation_key="battery",
5  options=["low", "medium", "high"],
6  device_class=SensorDeviceClass.ENUM,
7  value_fn=lambda device: device.battery,
8  )
9 ]

Definition at line 663 of file sensor.py.

◆ entity_description

homeassistant.components.withings.sensor.entity_description

Definition at line 890 of file sensor.py.

◆ SLEEP_GOAL

string homeassistant.components.withings.sensor.SLEEP_GOAL = "sleep"

Definition at line 549 of file sensor.py.

◆ SLEEP_SENSORS

list homeassistant.components.withings.sensor.SLEEP_SENSORS

Definition at line 316 of file sensor.py.

◆ STEP_GOAL

string homeassistant.components.withings.sensor.STEP_GOAL = "steps"

Definition at line 548 of file sensor.py.

◆ WEIGHT_GOAL

string homeassistant.components.withings.sensor.WEIGHT_GOAL = "weight"

Definition at line 550 of file sensor.py.

◆ WORKOUT_SENSORS

list homeassistant.components.withings.sensor.WORKOUT_SENSORS

Definition at line 600 of file sensor.py.