Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor all sensor types by default to rtorrent #17894

Merged
merged 4 commits into from Oct 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions homeassistant/components/sensor/rtorrent.py
Expand Up @@ -17,11 +17,6 @@
SENSOR_TYPE_CURRENT_STATUS = 'current_status'
SENSOR_TYPE_DOWNLOAD_SPEED = 'download_speed'
SENSOR_TYPE_UPLOAD_SPEED = 'upload_speed'
ALL_SENSOR_TYPES = [
SENSOR_TYPE_CURRENT_STATUS,
SENSOR_TYPE_DOWNLOAD_SPEED,
SENSOR_TYPE_UPLOAD_SPEED,
]

DEFAULT_NAME = 'rtorrent'
SENSOR_TYPES = {
Expand All @@ -33,7 +28,7 @@
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_URL): cv.url,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_MONITORED_VARIABLES, default=ALL_SENSOR_TYPES): vol.All(
vol.Optional(CONF_MONITORED_VARIABLES, default=SENSOR_TYPES): vol.All(
riptl marked this conversation as resolved.
Show resolved Hide resolved
cv.ensure_list, [vol.In(SENSOR_TYPES)]),
})

Expand Down