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

Classes

class  TiltBluetoothSensorEntity
 

Functions

PassiveBluetoothEntityKey _device_key_to_bluetooth_entity_key (DeviceKey device_key)
 
None async_setup_entry (HomeAssistant hass, config_entries.ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
PassiveBluetoothDataUpdate sensor_update_to_bluetooth_data_update (SensorUpdate sensor_update)
 

Variables

dictionary SENSOR_DESCRIPTIONS
 

Detailed Description

Support for Tilt Hydrometers.

Function Documentation

◆ _device_key_to_bluetooth_entity_key()

PassiveBluetoothEntityKey homeassistant.components.tilt_ble.sensor._device_key_to_bluetooth_entity_key ( DeviceKey  device_key)
private
Convert a device key to an entity key.

Definition at line 52 of file sensor.py.

◆ async_setup_entry()

None homeassistant.components.tilt_ble.sensor.async_setup_entry ( HomeAssistant  hass,
config_entries.ConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up the Tilt Hydrometer BLE sensors.

Definition at line 86 of file sensor.py.

◆ sensor_update_to_bluetooth_data_update()

PassiveBluetoothDataUpdate homeassistant.components.tilt_ble.sensor.sensor_update_to_bluetooth_data_update ( SensorUpdate  sensor_update)
Convert a sensor update to a bluetooth data update.

Definition at line 59 of file sensor.py.

Variable Documentation

◆ SENSOR_DESCRIPTIONS

dictionary homeassistant.components.tilt_ble.sensor.SENSOR_DESCRIPTIONS
Initial value:
1 = {
2  (DeviceClass.TEMPERATURE, Units.TEMP_FAHRENHEIT): SensorEntityDescription(
3  key=f"{DeviceClass.TEMPERATURE}_{Units.TEMP_FAHRENHEIT}",
4  device_class=SensorDeviceClass.TEMPERATURE,
5  native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
6  state_class=SensorStateClass.MEASUREMENT,
7  ),
8  (DeviceClass.SPECIFIC_GRAVITY, Units.SPECIFIC_GRAVITY): SensorEntityDescription(
9  key=f"{DeviceClass.SPECIFIC_GRAVITY}_{Units.SPECIFIC_GRAVITY}",
10  state_class=SensorStateClass.MEASUREMENT,
11  ),
12  (
13  DeviceClass.SIGNAL_STRENGTH,
14  Units.SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
15  ): SensorEntityDescription(
16  key=f"{DeviceClass.SIGNAL_STRENGTH}_{Units.SIGNAL_STRENGTH_DECIBELS_MILLIWATT}",
17  device_class=SensorDeviceClass.SIGNAL_STRENGTH,
18  native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
19  state_class=SensorStateClass.MEASUREMENT,
20  entity_registry_enabled_default=False,
21  ),
22 }

Definition at line 28 of file sensor.py.