Docstrings (#2395)

* Replace switch with lock

* Update docstrings

* Add link to docs

* Add link to docs and update docstrings

* Update docstring

* Update docstrings and fix typos

* Add link to docs

* Add link to docs

* Add link to docs and update docstrings

* Fix link to docs and update docstrings

* Remove blank line

* Add link to docs
This commit is contained in:
Fabian Affolter
2016-06-30 10:33:34 +02:00
committed by GitHub
parent 8dd7ebb08e
commit 419ff18afb
19 changed files with 91 additions and 113 deletions

View File

@@ -1,4 +1,9 @@
"""Support for openexchangerates.org exchange rates service."""
"""
Support for openexchangerates.org exchange rates service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.openexchangerates/
"""
from datetime import timedelta
import logging
import requests
@@ -41,7 +46,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class OpenexchangeratesSensor(Entity):
"""Implementing the Openexchangerates sensor."""
"""Representation of an Openexchangerates sensor."""
def __init__(self, rest, name, quote):
"""Initialize the sensor."""
@@ -87,7 +92,7 @@ class OpenexchangeratesData(object):
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Get the latest data from openexchangerates."""
"""Get the latest data from openexchangerates.org."""
try:
result = requests.get(self._resource, params={'base': self._base,
'app_id':