hass-core/homeassistant/components/transmission/const.py
J.P. Hutchins 54342d2a4e Add transmission info about torrents that is accessible with templating (#27111)
* Add information about current downloads.

* Cleanup: add "Torrent Info" state attribute

* Add username to codeowners

* Rename state_attributes - device_state_attributes.

* Fix snakecase keys, use f-strings, remove redundant method.

* Access started_torrent_dict directly

* Add return None condition

* Remove redundancy.

* Add missing comma in codeowners list.

* Add missing @ to username.

* Update CODEOWNERS with script.hassfest.

* Remove transmission_downloading, give started_torrents the info.

* Confirm changes.

* Actually approve changes.

* Resolve conflicts.

* Remove leftovers from old torrent_info sensor.

* Remove get_started_torrent_info method.

Old method to display boolean for the removed torrent_info sensor.
2019-10-28 10:20:59 +01:00

24 lines
785 B
Python

"""Constants for the Transmission Bittorent Client component."""
DOMAIN = "transmission"
SENSOR_TYPES = {
"active_torrents": ["Active Torrents", None],
"current_status": ["Status", None],
"download_speed": ["Down Speed", "MB/s"],
"paused_torrents": ["Paused Torrents", None],
"total_torrents": ["Total Torrents", None],
"upload_speed": ["Up Speed", "MB/s"],
"completed_torrents": ["Completed Torrents", None],
"started_torrents": ["Started Torrents", None],
}
SWITCH_TYPES = {"on_off": "Switch", "turtle_mode": "Turtle Mode"}
DEFAULT_NAME = "Transmission"
DEFAULT_PORT = 9091
DEFAULT_SCAN_INTERVAL = 120
STATE_ATTR_TORRENT_INFO = "torrent_info"
ATTR_TORRENT = "torrent"
SERVICE_ADD_TORRENT = "add_torrent"
DATA_UPDATED = "transmission_data_updated"