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

Classes

class  SysMonitorSensorEntityDescription
 
class  SystemMonitorSensor
 

Functions

None async_setup_entry (HomeAssistant hass, SystemMonitorConfigEntry entry, AddEntitiesCallback async_add_entities)
 
bool check_legacy_resource (str resource, set[str] resources)
 
Literal["mdi:cpu-64-bit", "mdi:cpu-32-bit"] get_cpu_icon ()
 
str|None get_ip_address (SystemMonitorSensor entity)
 
float|None get_network (SystemMonitorSensor entity)
 
float|None get_packets (SystemMonitorSensor entity)
 
float|None get_throughput (SystemMonitorSensor entity)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_ARG = "arg"
 
dictionary IF_ADDRS_FAMILY = {"ipv4_address": socket.AF_INET, "ipv6_address": socket.AF_INET6}
 
dictionary IO_COUNTER
 
int SENSOR_TYPE_DEVICE_CLASS = 3
 
int SENSOR_TYPE_ICON = 2
 
int SENSOR_TYPE_MANDATORY_ARG = 4
 
int SENSOR_TYPE_NAME = 0
 
int SENSOR_TYPE_UOM = 1
 
string SIGNAL_SYSTEMMONITOR_UPDATE = "systemmonitor_update"
 

Detailed Description

Support for monitoring the local system.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.systemmonitor.sensor.async_setup_entry ( HomeAssistant  hass,
SystemMonitorConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up System Monitor sensors based on a config entry.

Definition at line 397 of file sensor.py.

◆ check_legacy_resource()

bool homeassistant.components.systemmonitor.sensor.check_legacy_resource ( str  resource,
set[str]  resources 
)
Return True if legacy resource was configured.

Definition at line 375 of file sensor.py.

◆ get_cpu_icon()

Literal["mdi:cpu-64-bit", "mdi:cpu-32-bit"] homeassistant.components.systemmonitor.sensor.get_cpu_icon ( )
Return cpu icon.

Definition at line 59 of file sensor.py.

◆ get_ip_address()

str | None homeassistant.components.systemmonitor.sensor.get_ip_address ( SystemMonitorSensor  entity)
Return network ip address.

Definition at line 104 of file sensor.py.

◆ get_network()

float | None homeassistant.components.systemmonitor.sensor.get_network ( SystemMonitorSensor  entity)
Return network in and out.

Definition at line 66 of file sensor.py.

◆ get_packets()

float | None homeassistant.components.systemmonitor.sensor.get_packets ( SystemMonitorSensor  entity)
Return packets in and out.

Definition at line 75 of file sensor.py.

◆ get_throughput()

float | None homeassistant.components.systemmonitor.sensor.get_throughput ( SystemMonitorSensor  entity)
Return network throughput in and out.

Definition at line 83 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.systemmonitor.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 44 of file sensor.py.

◆ CONF_ARG

string homeassistant.components.systemmonitor.sensor.CONF_ARG = "arg"

Definition at line 46 of file sensor.py.

◆ IF_ADDRS_FAMILY

dictionary homeassistant.components.systemmonitor.sensor.IF_ADDRS_FAMILY = {"ipv4_address": socket.AF_INET, "ipv6_address": socket.AF_INET6}

Definition at line 394 of file sensor.py.

◆ IO_COUNTER

dictionary homeassistant.components.systemmonitor.sensor.IO_COUNTER
Initial value:
1 = {
2  "network_out": 0,
3  "network_in": 1,
4  "packets_out": 2,
5  "packets_in": 3,
6  "throughput_network_out": 0,
7  "throughput_network_in": 1,
8 }

Definition at line 386 of file sensor.py.

◆ SENSOR_TYPE_DEVICE_CLASS

int homeassistant.components.systemmonitor.sensor.SENSOR_TYPE_DEVICE_CLASS = 3

Definition at line 52 of file sensor.py.

◆ SENSOR_TYPE_ICON

int homeassistant.components.systemmonitor.sensor.SENSOR_TYPE_ICON = 2

Definition at line 51 of file sensor.py.

◆ SENSOR_TYPE_MANDATORY_ARG

int homeassistant.components.systemmonitor.sensor.SENSOR_TYPE_MANDATORY_ARG = 4

Definition at line 53 of file sensor.py.

◆ SENSOR_TYPE_NAME

int homeassistant.components.systemmonitor.sensor.SENSOR_TYPE_NAME = 0

Definition at line 49 of file sensor.py.

◆ SENSOR_TYPE_UOM

int homeassistant.components.systemmonitor.sensor.SENSOR_TYPE_UOM = 1

Definition at line 50 of file sensor.py.

◆ SIGNAL_SYSTEMMONITOR_UPDATE

string homeassistant.components.systemmonitor.sensor.SIGNAL_SYSTEMMONITOR_UPDATE = "systemmonitor_update"

Definition at line 55 of file sensor.py.