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

Functions

str format_progress (TorrentDictionary torrent)
 
dict[str, Any] format_torrent (TorrentDictionary torrent)
 
dict[str, dict[str, Any]] format_torrents (TorrentInfoList torrents)
 
str format_unix_timestamp (timestamp)
 
str seconds_to_hhmmss (seconds)
 
Client setup_client (str url, str username, str password, bool verify_ssl)
 

Detailed Description

Helper functions for qBittorrent.

Function Documentation

◆ format_progress()

str homeassistant.components.qbittorrent.helpers.format_progress ( TorrentDictionary  torrent)
Format the progress of a torrent.

Definition at line 34 of file helpers.py.

◆ format_torrent()

dict[str, Any] homeassistant.components.qbittorrent.helpers.format_torrent ( TorrentDictionary  torrent)
Format a single torrent.

Definition at line 51 of file helpers.py.

◆ format_torrents()

dict[str, dict[str, Any]] homeassistant.components.qbittorrent.helpers.format_torrents ( TorrentInfoList  torrents)
Format a list of torrents.

Definition at line 40 of file helpers.py.

◆ format_unix_timestamp()

str homeassistant.components.qbittorrent.helpers.format_unix_timestamp (   timestamp)
Format a UNIX timestamp to a human-readable date.

Definition at line 28 of file helpers.py.

◆ seconds_to_hhmmss()

str homeassistant.components.qbittorrent.helpers.seconds_to_hhmmss (   seconds)
Convert seconds to HH:MM:SS format.

Definition at line 18 of file helpers.py.

◆ setup_client()

Client homeassistant.components.qbittorrent.helpers.setup_client ( str  url,
str  username,
str  password,
bool  verify_ssl 
)
Create a qBittorrent client.

Definition at line 9 of file helpers.py.