Move qbittorrent constants to const.py (#90201)

* move qbittorrent constants to const.py

* move SENSOR_TYPE_* consts back to sensors.py
This commit is contained in:
Chris Xiao 2023-03-24 09:20:37 -04:00 committed by GitHub
parent a66bef6fdf
commit 8149652f9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,3 @@
"""Constants for qBittorrent."""
DEFAULT_NAME = "qBittorrent"

View File

@ -28,14 +28,14 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import DEFAULT_NAME
_LOGGER = logging.getLogger(__name__)
SENSOR_TYPE_CURRENT_STATUS = "current_status"
SENSOR_TYPE_DOWNLOAD_SPEED = "download_speed"
SENSOR_TYPE_UPLOAD_SPEED = "upload_speed"
DEFAULT_NAME = "qBittorrent"
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key=SENSOR_TYPE_CURRENT_STATUS,