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

Classes

class  SwitchBotCloudSensor
 

Functions

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

Variables

tuple METER_PLUS_SENSOR_DESCRIPTIONS
 
tuple METER_PRO_CO2_SENSOR_DESCRIPTIONS
 
string SENSOR_TYPE_BATTERY = "battery"
 
string SENSOR_TYPE_CO2 = "CO2"
 
string SENSOR_TYPE_HUMIDITY = "humidity"
 
string SENSOR_TYPE_TEMPERATURE = "temperature"
 

Detailed Description

Platform for sensor integration.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.switchbot_cloud.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config,
AddEntitiesCallback  async_add_entities 
)
Set up SwitchBot Cloud entry.

Definition at line 62 of file sensor.py.

Variable Documentation

◆ METER_PLUS_SENSOR_DESCRIPTIONS

tuple homeassistant.components.switchbot_cloud.sensor.METER_PLUS_SENSOR_DESCRIPTIONS
Initial value:
1 = (
2  SensorEntityDescription(
3  key=SENSOR_TYPE_TEMPERATURE,
4  device_class=SensorDeviceClass.TEMPERATURE,
5  state_class=SensorStateClass.MEASUREMENT,
6  native_unit_of_measurement=UnitOfTemperature.CELSIUS,
7  ),
8  SensorEntityDescription(
9  key=SENSOR_TYPE_HUMIDITY,
10  device_class=SensorDeviceClass.HUMIDITY,
11  state_class=SensorStateClass.MEASUREMENT,
12  native_unit_of_measurement=PERCENTAGE,
13  ),
14  SensorEntityDescription(
15  key=SENSOR_TYPE_BATTERY,
16  device_class=SensorDeviceClass.BATTERY,
17  state_class=SensorStateClass.MEASUREMENT,
18  native_unit_of_measurement=PERCENTAGE,
19  ),
20 )

Definition at line 30 of file sensor.py.

◆ METER_PRO_CO2_SENSOR_DESCRIPTIONS

tuple homeassistant.components.switchbot_cloud.sensor.METER_PRO_CO2_SENSOR_DESCRIPTIONS
Initial value:
1 = (
2  *METER_PLUS_SENSOR_DESCRIPTIONS,
3  SensorEntityDescription(
4  key=SENSOR_TYPE_CO2,
5  native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
6  state_class=SensorStateClass.MEASUREMENT,
7  device_class=SensorDeviceClass.CO2,
8  ),
9 )

Definition at line 51 of file sensor.py.

◆ SENSOR_TYPE_BATTERY

string homeassistant.components.switchbot_cloud.sensor.SENSOR_TYPE_BATTERY = "battery"

Definition at line 27 of file sensor.py.

◆ SENSOR_TYPE_CO2

string homeassistant.components.switchbot_cloud.sensor.SENSOR_TYPE_CO2 = "CO2"

Definition at line 28 of file sensor.py.

◆ SENSOR_TYPE_HUMIDITY

string homeassistant.components.switchbot_cloud.sensor.SENSOR_TYPE_HUMIDITY = "humidity"

Definition at line 26 of file sensor.py.

◆ SENSOR_TYPE_TEMPERATURE

string homeassistant.components.switchbot_cloud.sensor.SENSOR_TYPE_TEMPERATURE = "temperature"

Definition at line 25 of file sensor.py.