fixed state case for rtorrent (#18778)

This commit is contained in:
Eliseo Martelli 2018-12-01 12:00:35 +01:00 committed by Fabian Affolter
parent 29f15393b1
commit c69fe43e75

View file

@ -110,11 +110,11 @@ class RTorrentSensor(Entity):
if self.type == SENSOR_TYPE_CURRENT_STATUS:
if self.data:
if upload > 0 and download > 0:
self._state = 'Up/Down'
self._state = 'up_down'
elif upload > 0 and download == 0:
self._state = 'Seeding'
self._state = 'seeding'
elif upload == 0 and download > 0:
self._state = 'Downloading'
self._state = 'downloading'
else:
self._state = STATE_IDLE
else: