Update docstring (config file) and attempt to honor PEP0257

This commit is contained in:
Fabian Affolter 2015-09-07 18:55:58 +02:00
parent e196c136c1
commit e55922eb9e
3 changed files with 23 additions and 27 deletions

View file

@ -7,7 +7,7 @@ runs with the Firmata firmware.
Configuration: Configuration:
To use the Arduino board you will need to add something like the following To use the Arduino board you will need to add something like the following
to your config/configuration.yaml to your configuration.yaml file.
arduino: arduino:
port: /dev/ttyACM0 port: /dev/ttyACM0

View file

@ -1,17 +1,12 @@
""" """
homeassistant.components.modbus homeassistant.components.modbus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modbus component, using pymodbus (python3 branch) Modbus component, using pymodbus (python3 branch).
Configuration:
To use the Forecast sensor you will need to add something like the
following to your config/configuration.yaml
Configuration: Configuration:
To use the Modbus component you will need to add something like the following To use the Modbus component you will need to add something like the following
to your config/configuration.yaml to your configuration.yaml file.
#Modbus TCP #Modbus TCP
modbus: modbus:

View file

@ -1,11 +1,13 @@
""" """
components.verisure components.verisure
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Provides support for verisure components.
Provides support for verisure components
Configuration: Configuration:
To use the Verisure component you will need to add something like the
following to your configuration.yaml file.
verisure: verisure:
username: user@example.com username: user@example.com
password: password password: password
@ -14,32 +16,31 @@ verisure:
smartplugs: 1 smartplugs: 1
thermometers: 0 thermometers: 0
Variables: Variables:
username username
*Required *Required
Username to verisure mypages Username to Verisure mypages.
password password
*Required *Required
Password to verisure mypages Password to Verisure mypages.
alarm alarm
*Opional *Optional
Set to 1 to show alarm, 0 to disable. Default 1 Set to 1 to show alarm, 0 to disable. Default 1.
hygrometers hygrometers
*Opional *Optional
Set to 1 to show hygrometers, 0 to disable. Default 1 Set to 1 to show hygrometers, 0 to disable. Default 1.
smartplugs smartplugs
*Opional *Optional
Set to 1 to show smartplugs, 0 to disable. Default 1 Set to 1 to show smartplugs, 0 to disable. Default 1.
thermometers thermometers
*Opional *Optional
Set to 1 to show thermometers, 0 to disable. Default 1 Set to 1 to show thermometers, 0 to disable. Default 1.
""" """
import logging import logging
from datetime import timedelta from datetime import timedelta
@ -135,22 +136,22 @@ def setup(hass, config):
def get_alarm_status(): def get_alarm_status():
''' return a list of status overviews for alarm components ''' """ Return a list of status overviews for alarm components. """
return STATUS[MY_PAGES.DEVICE_ALARM] return STATUS[MY_PAGES.DEVICE_ALARM]
def get_climate_status(): def get_climate_status():
''' return a list of status overviews for alarm components ''' """ Return a list of status overviews for alarm components. """
return STATUS[MY_PAGES.DEVICE_CLIMATE] return STATUS[MY_PAGES.DEVICE_CLIMATE]
def get_smartplug_status(): def get_smartplug_status():
''' return a list of status overviews for alarm components ''' """ Return a list of status overviews for alarm components. """
return STATUS[MY_PAGES.DEVICE_SMARTPLUG] return STATUS[MY_PAGES.DEVICE_SMARTPLUG]
def reconnect(): def reconnect():
''' reconnect to verisure mypages ''' """ Reconnect to verisure mypages. """
try: try:
MY_PAGES.login() MY_PAGES.login()
except VERISURE_LOGIN_ERROR as ex: except VERISURE_LOGIN_ERROR as ex:
@ -163,7 +164,7 @@ def reconnect():
@Throttle(MIN_TIME_BETWEEN_REQUESTS) @Throttle(MIN_TIME_BETWEEN_REQUESTS)
def update(): def update():
''' Updates the status of verisure components ''' """ Updates the status of verisure components. """
if WRONG_PASSWORD_GIVEN: if WRONG_PASSWORD_GIVEN:
# Is there any way to inform user? # Is there any way to inform user?
return return