Update docstrings
This commit is contained in:
parent
5cea8fda9f
commit
847e92f57a
4 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue