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

@ -57,10 +57,12 @@ class AlarmDotCom(alarm.AlarmControlPanel):
@property
def should_poll(self):
""" No polling needed. """
return True
@property
def name(self):
""" Returns the name of the device. """
return self._name
@property

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

View file

@ -78,4 +78,5 @@ class TwitchSensor(Entity):
@property
def icon(self):
""" Icon to use in the frontend, if any. """
return ICON

View file

@ -25,8 +25,6 @@ _LOGGER = logging.getLogger(__name__)
def setup(hass, config):
""" Setup weblink component. """
# States are in the format DOMAIN.OBJECT_ID
links = config.get(DOMAIN)
for link in links.get('entities'):