Update docstrings

This commit is contained in:
Fabian Affolter 2016-02-03 00:01:26 +01:00
parent 5cea8fda9f
commit 847e92f57a
4 changed files with 7 additions and 2 deletions

View file

@ -67,10 +67,12 @@ class SystemMonitorSensor(Entity):
@property
def name(self):
""" Returns the name of the sensor. """
return self._name.rstrip()
@property
def icon(self):
""" Icon to use in the frontend, if any. """
return SENSOR_TYPES[self.type][2]
@property
@ -80,10 +82,12 @@ class SystemMonitorSensor(Entity):
@property
def unit_of_measurement(self):
""" Unit of measurement of this entity, if any. """
return self._unit_of_measurement
# pylint: disable=too-many-branches
def update(self):
""" Get the latest system informations. """
import psutil
if self.type == 'disk_use_percent':
self._state = psutil.disk_usage(self.argument).percent