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

Classes

class  QBittorrentSensor
 
class  QBittorrentSensorEntityDescription
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
int count_torrents_in_states (QBittorrentDataCoordinator coordinator, list[str] states)
 
int get_dl (QBittorrentDataCoordinator coordinator)
 
str get_state (QBittorrentDataCoordinator coordinator)
 
int get_up (QBittorrentDataCoordinator coordinator)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string SENSOR_TYPE_ACTIVE_TORRENTS = "active_torrents"
 
string SENSOR_TYPE_ALL_TORRENTS = "all_torrents"
 
string SENSOR_TYPE_CURRENT_STATUS = "current_status"
 
string SENSOR_TYPE_DOWNLOAD_SPEED = "download_speed"
 
string SENSOR_TYPE_INACTIVE_TORRENTS = "inactive_torrents"
 
string SENSOR_TYPE_PAUSED_TORRENTS = "paused_torrents"
 
string SENSOR_TYPE_UPLOAD_SPEED = "upload_speed"
 

Detailed Description

Support for monitoring the qBittorrent API.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.qbittorrent.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up qBittorrent sensor entries.

Definition at line 129 of file sensor.py.

◆ count_torrents_in_states()

int homeassistant.components.qbittorrent.sensor.count_torrents_in_states ( QBittorrentDataCoordinator  coordinator,
list[str]   states 
)
Count the number of torrents in specified states.

Definition at line 172 of file sensor.py.

◆ get_dl()

int homeassistant.components.qbittorrent.sensor.get_dl ( QBittorrentDataCoordinator  coordinator)
Get current download speed.

Definition at line 53 of file sensor.py.

◆ get_state()

str homeassistant.components.qbittorrent.sensor.get_state ( QBittorrentDataCoordinator  coordinator)
Get current download/upload state.

Definition at line 38 of file sensor.py.

◆ get_up()

int homeassistant.components.qbittorrent.sensor.get_up ( QBittorrentDataCoordinator  coordinator)
Get current upload speed.

Definition at line 59 of file sensor.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 27 of file sensor.py.

◆ SENSOR_TYPE_ACTIVE_TORRENTS

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_ACTIVE_TORRENTS = "active_torrents"

Definition at line 34 of file sensor.py.

◆ SENSOR_TYPE_ALL_TORRENTS

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_ALL_TORRENTS = "all_torrents"

Definition at line 32 of file sensor.py.

◆ SENSOR_TYPE_CURRENT_STATUS

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_CURRENT_STATUS = "current_status"

Definition at line 29 of file sensor.py.

◆ SENSOR_TYPE_DOWNLOAD_SPEED

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_DOWNLOAD_SPEED = "download_speed"

Definition at line 30 of file sensor.py.

◆ SENSOR_TYPE_INACTIVE_TORRENTS

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_INACTIVE_TORRENTS = "inactive_torrents"

Definition at line 35 of file sensor.py.

◆ SENSOR_TYPE_PAUSED_TORRENTS

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_PAUSED_TORRENTS = "paused_torrents"

Definition at line 33 of file sensor.py.

◆ SENSOR_TYPE_UPLOAD_SPEED

string homeassistant.components.qbittorrent.sensor.SENSOR_TYPE_UPLOAD_SPEED = "upload_speed"

Definition at line 31 of file sensor.py.