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

Classes

class  BaseDevoloSensorEntity
 
class  DataRateDirection
 
class  DevoloPlcDataRateSensorEntity
 
class  DevoloSensorEntity
 
class  DevoloSensorEntityDescription
 

Functions

None __init__ (self, DevoloHomeNetworkConfigEntry entry, DevoloDataUpdateCoordinator[_CoordinatorDataT] coordinator, DevoloSensorEntityDescription[_ValueDataT, _SensorDataT] description)
 
datetime _last_restart (int runtime)
 
None async_setup_entry (HomeAssistant hass, DevoloHomeNetworkConfigEntry entry, AddEntitiesCallback async_add_entities)
 
int|float|datetime native_value (self)
 

Variables

 _CoordinatorDataType
 
 _SensorDataType
 
 coordinators = entry.runtime_data.coordinators
 
 device = entry.runtime_data.device
 
 device_class
 
 entity_category
 
 entity_description
 
 entity_registry_enabled_default
 
 key
 
 name
 
 native_unit_of_measurement
 
 network = await device.plcnet.async_get_network_overview()
 
int PARALLEL_UPDATES = 0
 
list peers
 
 state_class
 
 suggested_display_precision
 
 value_func
 

Detailed Description

Platform for sensor integration.

Function Documentation

◆ __init__()

None homeassistant.components.devolo_home_network.sensor.__init__ (   self,
DevoloHomeNetworkConfigEntry  entry,
DevoloDataUpdateCoordinator[_CoordinatorDataT]  coordinator,
DevoloSensorEntityDescription[_ValueDataT, _SensorDataT]  description 
)
Representation of a devolo sensor.
Initialize entity.

Definition at line 198 of file sensor.py.

◆ _last_restart()

datetime homeassistant.components.devolo_home_network.sensor._last_restart ( int  runtime)
private
Calculate uptime. As fetching the data might also take some time, let's floor to the nearest 5 seconds.

Definition at line 40 of file sensor.py.

◆ async_setup_entry()

None homeassistant.components.devolo_home_network.sensor.async_setup_entry ( HomeAssistant  hass,
DevoloHomeNetworkConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)

Definition at line 123 of file sensor.py.

◆ native_value()

int | float | datetime homeassistant.components.devolo_home_network.sensor.native_value (   self)
Representation of a generic devolo sensor.
State of the sensor.

Definition at line 219 of file sensor.py.

Variable Documentation

◆ _CoordinatorDataType

homeassistant.components.devolo_home_network.sensor._CoordinatorDataType
private

Definition at line 50 of file sensor.py.

◆ _SensorDataType

homeassistant.components.devolo_home_network.sensor._SensorDataType
private

Definition at line 53 of file sensor.py.

◆ coordinators

homeassistant.components.devolo_home_network.sensor.coordinators = entry.runtime_data.coordinators

Definition at line 130 of file sensor.py.

◆ device

homeassistant.components.devolo_home_network.sensor.device = entry.runtime_data.device
Get all devices and sensors and setup them via config entry.

Definition at line 129 of file sensor.py.

◆ device_class

homeassistant.components.devolo_home_network.sensor.device_class

Definition at line 99 of file sensor.py.

◆ entity_category

homeassistant.components.devolo_home_network.sensor.entity_category

Definition at line 76 of file sensor.py.

◆ entity_description

homeassistant.components.devolo_home_network.sensor.entity_description

Definition at line 205 of file sensor.py.

◆ entity_registry_enabled_default

homeassistant.components.devolo_home_network.sensor.entity_registry_enabled_default

Definition at line 77 of file sensor.py.

◆ key

homeassistant.components.devolo_home_network.sensor.key
Describes devolo sensor entity.

Definition at line 75 of file sensor.py.

◆ name

homeassistant.components.devolo_home_network.sensor.name

Definition at line 98 of file sensor.py.

◆ native_unit_of_measurement

homeassistant.components.devolo_home_network.sensor.native_unit_of_measurement

Definition at line 100 of file sensor.py.

◆ network

homeassistant.components.devolo_home_network.sensor.network = await device.plcnet.async_get_network_overview()

Definition at line 141 of file sensor.py.

◆ PARALLEL_UPDATES

int homeassistant.components.devolo_home_network.sensor.PARALLEL_UPDATES = 0

Definition at line 37 of file sensor.py.

◆ peers

list homeassistant.components.devolo_home_network.sensor.peers
Initial value:
1 = [
2  peer.mac_address for peer in network.devices if peer.topology == REMOTE
3  ]

Definition at line 142 of file sensor.py.

◆ state_class

homeassistant.components.devolo_home_network.sensor.state_class

Definition at line 86 of file sensor.py.

◆ suggested_display_precision

homeassistant.components.devolo_home_network.sensor.suggested_display_precision

Definition at line 102 of file sensor.py.

◆ value_func

homeassistant.components.devolo_home_network.sensor.value_func

Definition at line 78 of file sensor.py.