From e55922eb9e6639c5285036e6cac48d1837f3efd9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Sep 2015 18:55:58 +0200 Subject: [PATCH] Update docstring (config file) and attempt to honor PEP0257 --- homeassistant/components/arduino.py | 2 +- homeassistant/components/modbus.py | 9 ++----- homeassistant/components/verisure.py | 39 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/homeassistant/components/arduino.py b/homeassistant/components/arduino.py index db91c5e0d9c..cbb319e2541 100644 --- a/homeassistant/components/arduino.py +++ b/homeassistant/components/arduino.py @@ -7,7 +7,7 @@ runs with the Firmata firmware. Configuration: 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: port: /dev/ttyACM0 diff --git a/homeassistant/components/modbus.py b/homeassistant/components/modbus.py index e6c3f1cfcee..3affeb3efee 100644 --- a/homeassistant/components/modbus.py +++ b/homeassistant/components/modbus.py @@ -1,17 +1,12 @@ """ homeassistant.components.modbus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -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 +Modbus component, using pymodbus (python3 branch). Configuration: 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: diff --git a/homeassistant/components/verisure.py b/homeassistant/components/verisure.py index d716c8c46ad..c258e89aa9b 100644 --- a/homeassistant/components/verisure.py +++ b/homeassistant/components/verisure.py @@ -1,11 +1,13 @@ """ components.verisure -~~~~~~~~~~~~~~~~~~ - -Provides support for verisure components +~~~~~~~~~~~~~~~~~~~ +Provides support for verisure components. Configuration: +To use the Verisure component you will need to add something like the +following to your configuration.yaml file. + verisure: username: user@example.com password: password @@ -14,32 +16,31 @@ verisure: smartplugs: 1 thermometers: 0 - Variables: username *Required -Username to verisure mypages +Username to Verisure mypages. password *Required -Password to verisure mypages +Password to Verisure mypages. alarm -*Opional -Set to 1 to show alarm, 0 to disable. Default 1 +*Optional +Set to 1 to show alarm, 0 to disable. Default 1. hygrometers -*Opional -Set to 1 to show hygrometers, 0 to disable. Default 1 +*Optional +Set to 1 to show hygrometers, 0 to disable. Default 1. smartplugs -*Opional -Set to 1 to show smartplugs, 0 to disable. Default 1 +*Optional +Set to 1 to show smartplugs, 0 to disable. Default 1. thermometers -*Opional -Set to 1 to show thermometers, 0 to disable. Default 1 +*Optional +Set to 1 to show thermometers, 0 to disable. Default 1. """ import logging from datetime import timedelta @@ -135,22 +136,22 @@ def setup(hass, config): 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] 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] 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] def reconnect(): - ''' reconnect to verisure mypages ''' + """ Reconnect to verisure mypages. """ try: MY_PAGES.login() except VERISURE_LOGIN_ERROR as ex: @@ -163,7 +164,7 @@ def reconnect(): @Throttle(MIN_TIME_BETWEEN_REQUESTS) def update(): - ''' Updates the status of verisure components ''' + """ Updates the status of verisure components. """ if WRONG_PASSWORD_GIVEN: # Is there any way to inform user? return